package com.ga.core.mapper.dict;

import com.ga.core.vo.dict.DataDomainOptionResp;
import com.ga.core.vo.dict.DataDomainResp;
import com.ga.core.vo.dict.DataDomainSearchParam;
import com.ga.core.vo.dict.DataDomainVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface DataDomainMapper {

    List<DataDomainResp> selectList(DataDomainSearchParam param);

    DataDomainResp selectByCode(@Param("domainCode") String domainCode);

    /** 드롭다운 Select 옵션용 전체 목록 (활성 도메인) */
    List<DataDomainOptionResp> selectAll();

    int insert(DataDomainVO vo);

    int update(DataDomainVO vo);

    int delete(@Param("domainCode") String domainCode);

    /** data_dictionary 에서 해당 domainCode 를 참조하는 컬럼 수 */
    int countUsageByCode(@Param("domainCode") String domainCode);
}
