package cn.stylefeng.team.meta.api;

import cn.stylefeng.team.meta.api.entity.MetaDefinition;
import cn.stylefeng.team.meta.api.entity.MetaField;
import cn.stylefeng.team.meta.api.entity.MetaModel;
import cn.stylefeng.team.meta.api.pojo.MetaModelDTO;

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

public interface MetaModelServiceApi {

    List<MetaModelDTO> getModelFieldInfoList(List<Long> modelIdList);

    List<MetaModel> getBusinessMetaModelList(Long businessId, Set<String> tableNameList);

    MetaModel getMainMetaModel(Long businessId);

    String getSubTableLinkFieldCode(Long businessId, String tableName);

    String getModelDefinitionTableName(Long modelDefinitionId);

    MetaModel getMetaModelNameAndCode(Long modelDefinitionId);

    boolean getTableCreateFlag(String metaModelCode);

    Map<Long, Integer> statModelNumber(Set<Long> businessIdList);

    String getMetaModelCode(Long metaModelId);

    void cleanBusinessModel(Long businessId);

    void savePackageModel(List<MetaModel> metaModelList, List<MetaDefinition> metaDefinitionList, List<MetaField> metaFieldList);

    void executeCreateTable(MetaModel metaModel, List<MetaField> modelFieldList);

}
