package cn.stylefeng.team.meta.modular.service;

import cn.stylefeng.roses.kernel.db.api.pojo.page.PageResult;
import cn.stylefeng.team.meta.api.MetaFieldServiceApi;
import cn.stylefeng.team.meta.api.entity.MetaField;
import cn.stylefeng.team.meta.api.pojo.MetaFieldShowDTO;
import cn.stylefeng.team.meta.modular.pojo.request.MetaFieldRequest;
import cn.stylefeng.team.meta.modular.pojo.request.SqlImportRequest;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

public interface MetaFieldService extends IService<MetaField>, MetaFieldServiceApi {

    List<MetaField> findList(MetaFieldRequest metaFieldRequest);

    PageResult<MetaField> findPage(MetaFieldRequest metaFieldRequest);

    void removeDefinitionFieldList(List<Long> definitionIdList);

    List<MetaField> getFieldList(MetaFieldRequest metaFieldRequest);

    List<MetaField> simpleGetFieldList(MetaFieldRequest metaFieldRequest);

    void saveOrUpdateFieldList(MetaFieldRequest metaFieldRequest);

    int sqlImport(SqlImportRequest sqlImportRequest);

    List<MetaField> getDefaultFieldList(Integer defaultFieldType);

    void customBatchSave(List<MetaField> metaFieldList);

    List<MetaFieldShowDTO> getFieldCollectionByModelIdList(MetaFieldRequest metaFieldRequest);

    List<MetaField> getBatchMetaFieldList(List<Long> metaDefinitionIdList);

    void updateVirtualField(MetaFieldRequest metaFieldRequest);

    void cleanBusinessFields(Long businessId);

}