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

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

/** 공통코드 그룹/값(tb_uiws_code_grp, tb_uiws_code) 매퍼. 원본 CodeGrpRepository/CodeRepository 변환. */
@Mapper
public interface CodeMapper {
    List<SysCodeGrp> searchGroups(@Param("keyword") String keyword,
                                  @Param("offset") int offset, @Param("size") int size);
    long countGroups(@Param("keyword") String keyword);
    SysCodeGrp findGroupById(@Param("grpCd") String grpCd);
    boolean groupExists(@Param("grpCd") String grpCd);
    int insertGroup(SysCodeGrp grp);
    int updateGroup(SysCodeGrp grp);
    int deleteGroup(@Param("grpCd") String grpCd);
    List<SysCode> findValuesByGrp(@Param("grpCd") String grpCd);
    List<SysCode> findActiveValuesByGrp(@Param("grpCd") String grpCd);
    int insertValue(SysCode code);
    int deleteValuesByGrp(@Param("grpCd") String grpCd);
}
