package incheon.ags.ias.user.service;

import incheon.ags.ias.user.vo.UserSearchVO;
import incheon.ags.ias.user.vo.UserVO;

import java.util.List;
import java.util.Map;

/**
 * 사용자 관리 Service 인터페이스
 */
public interface UserService {

    /* ========================================
     * 사용자 관련 메서드
     * ======================================== */

    /**
     * 사용자 목록 조회 (페이징)
     */
    List<Map<String, Object>> selectUserList(UserSearchVO userSearchVO) throws Exception;

    /**
     * 사용자 총 개수 조회 (검색 조건 적용)
     */
    int selectUserCnt(UserSearchVO userSearchVO) throws Exception;

    /**
     * 사용자 상세 조회
     */
    UserVO selectUserDetail(UserVO userVO) throws Exception;

    /**
     * 사용자 등록
     */
    int insertUser(UserVO userVO) throws Exception;

    /**
     * 사용자 수정
     */
    int updateUser(UserVO userVO) throws Exception;

    /**
     * 사용자 삭제
     */
    int deleteUser(UserVO userVO) throws Exception;

    /* ========================================
     * 부서/직급 관련 메서드
     * ======================================== */

    /**
     * 부서 목록 조회
     */
    List<Map<String, Object>> deptList() throws Exception;

    /**
     * 직급 목록 조회
     */
    List<Map<String, Object>> jbgdList() throws Exception;

    /**
     * 사용자 상태별 개수 조회
     */
    Map<String, Object> selectUserStatusCnt() throws Exception;

    /**
     * 부서별 사용자 수 조회
     */
    List<Map<String, Object>> selectUserCntByDept() throws Exception;

    /**
     * 사용자 ID 중복 체크
     * @param userId 사용자 ID
     * @return 중복 여부 (true: 중복, false: 사용 가능)
     */
    boolean isUserIdDuplicate(String userId) throws Exception;

    /**
     * 사용자 이메일 중복 체크
     * @param emlAddr 이메일 주소
     * @return 중복 여부 (true: 중복, false: 사용 가능)
     */
    boolean isEmailDuplicate(String emlAddr) throws Exception;
}
