package cn.stylefeng.team.meta.api;

import cn.stylefeng.team.meta.api.entity.MetaField;
import cn.stylefeng.team.meta.api.pojo.MetaFieldDTO;
import cn.stylefeng.team.meta.api.pojo.SubTableMetaFieldDTO;
import cn.stylefeng.team.meta.api.pojo.db.DatabaseTableDTO;
import cn.stylefeng.team.meta.api.pojo.table.GenerationTableAlter;
import cn.stylefeng.team.meta.api.pojo.table.TableAlterLog;

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

public interface MetaFieldServiceApi {

    List<MetaFieldDTO> getModelFieldInfoList(Set<Long> metaFieldIdList);

    List<MetaField> getBusinessMainModelFields(Long businessId);

    DatabaseTableDTO getTableFieldList(String tableName);

    List<MetaField> quickGetFieldList(Long definitionId);

    void updateMetaField(Long metaModelId, List<TableAlterLog> tableAlterLogList);

    List<GenerationTableAlter> getGenerationTableAlterList(List<TableAlterLog> tableAlterLogList);

    List<MetaField> quickGetFieldList(List<Long> definitionIdList);

    List<MetaField> quickGetFieldList(String realFlag, List<Long> definitionIdList);

    void addMainModelLinkSubTableVirtualField(Long modelId, List<SubTableMetaFieldDTO> subTableMetaFieldDTOList);

    List<MetaField> getFieldListByModelId(String realFlag, Long metaModelId);

}
