package com.ozs.mdm.service;

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

import org.springframework.web.multipart.MultipartFile;

import com.ozs.mdm.dto.CreateTableCopyDTO;
import com.ozs.mdm.dto.MdmCreateTableDTO;
import com.ozs.mdm.dto.MdmDimColumnType;
import com.ozs.mdm.dto.MdmDimCreateOption;
import com.ozs.mdm.dto.MdmInfoColumn;
import com.ozs.mdm.dto.MdmInfoDatabase;
import com.ozs.mdm.dto.MdmInfoTable;
import com.ozs.mdm.dto.UpdateTableDTO;
import com.ozs.mdm.util.R;

public interface StorageManageService {

	R<List<MdmInfoDatabase>> listDatabaseOption(String resourceName) throws Exception;

	R<List<MdmInfoDatabase>> listDatabaseOptionAll(String resourceName) throws Exception;

	R<List<MdmDimCreateOption>> listCreateTableOption() throws Exception;

	R<String> createTable(MdmCreateTableDTO tableDto) throws Exception;

	String getTemplateColums(String substring) throws Exception;

	R<List<Map<String, Object>>> loadTemplateColums(MultipartFile file) throws Exception;

	R<String> createTableByDDL(MdmCreateTableDTO tableDto) throws Exception;

	R<List<MdmInfoTable>> listTable(String tableName, String tableComment, String databaseId, String sort, String order,
			Integer page, Integer pageSize) throws Exception;

	R<List<MdmInfoTable>> listTableScan(String tableName, String tableComment, String databaseId, String sort,
			String order, Integer page, Integer pageSize);

	R<String> removeTableById(String tableId) throws Exception;

	R<String> updateTable(UpdateTableDTO uTableDto) throws Exception;

	R<MdmCreateTableDTO> getTableInfoById(String tableId) throws Exception;

	R<List<MdmInfoColumn>> listColumsByTableId(String tableId);

	R<List<MdmDimColumnType>> listColumTypeByDatabaseType(Integer databaseType);

	R<String> createTableByCopy(CreateTableCopyDTO tableCopyDto) throws Exception;

}
