package com.zioinfo.esn.uiws.system.mapper;

import com.zioinfo.esn.uiws.system.model.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;

/** 부서(tb_uiws_dept) 매퍼. 원본 DeptRepository 변환. */
@Mapper
public interface DeptMapper {
    List<SysDept> search(@Param("keyword") String keyword,
                         @Param("offset") int offset, @Param("size") int size);
    long countSearch(@Param("keyword") String keyword);
    List<SysDept> searchActive(@Param("keyword") String keyword);
    List<SysDept> findActiveOrdered();
    List<SysDept> findAll();
    SysDept findById(@Param("deptId") String deptId);
    boolean existsById(@Param("deptId") String deptId);
    boolean existsByParentDeptId(@Param("parentDeptId") String parentDeptId);
    int insert(SysDept dept);
    int update(SysDept dept);
    int deleteById(@Param("deptId") String deptId);
}
