package incheon.cmm.g2f.download.mapper;

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

import incheon.com.config.annotation.MainDB;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import incheon.cmm.g2f.layer.vo.TaskLayerVO;
import incheon.cmm.g2f.layer.vo.userLayerSearchRequestDTO;

@org.egovframe.rte.psl.dataaccess.mapper.Mapper @incheon.com.config.annotation.MainDB
public interface DownloadMapper {
    
    /**
     * 레이어 다운로드 메타정보 조회
     */
    Map<String, Object> selectDownloadLayerInfo(@Param("layerId") Long layerId);
    
    /**
     * 사용자 레이어 다운로드 메타정보 조회
     */
    Map<String, Object> selectDownloadUserLayerInfo(@Param("layerId") Long layerId);
    
    /**
     * 테이블의 속성 컬럼 목록 조회 (geometry 제외)
     */
    List<Map<String, Object>> selectTableColumns(@Param("tableName") String tableName);
    
    /**
     * 사업자 레이어 목록 조회 (count포함)
     */
    Map<String, Object> selectLayerList(@Param("layerId") Long layerId);
    int selectLayerListTotCnt(@Param("layerId") String tableName);
    
    /**
     * 사용자 레이어 목록 조회 (count포함)
     */
    List<TaskLayerVO> selectUserLayerListTot(userLayerSearchRequestDTO searchVO);
    long selectUserLayerListTotCnt(userLayerSearchRequestDTO searchVO);
}