package com.purui.prims.headless.server.service;

import com.github.pagehelper.PageInfo;
import com.purui.prims.auth.api.authentication.pojo.User;
import com.purui.prims.common.pojo.DataEvent;
import com.purui.prims.common.pojo.enums.EventType;
import com.purui.prims.headless.api.pojo.request.DimensionReq;
import com.purui.prims.headless.api.pojo.request.MetaBatchReq;
import com.purui.prims.headless.api.pojo.request.PageDimensionReq;
import com.purui.prims.headless.api.pojo.response.DimensionResp;
import com.purui.prims.headless.server.pojo.DimensionsFilter;
import com.purui.prims.headless.server.pojo.MetaFilter;

import java.util.List;

public interface DimensionService {

    List<DimensionResp> getDimensions(MetaFilter metaFilter);

    DimensionResp getDimension(String bizName, Long modelId);

    DimensionResp getDimension(Long id);

    void batchUpdateStatus(MetaBatchReq metaBatchReq, User user);

    DimensionResp createDimension(DimensionReq dimensionReq, User user) throws Exception;

    void createDimensionBatch(List<DimensionReq> dimensionReqs, User user) throws Exception;

    void updateDimension(DimensionReq dimensionReq, User user) throws Exception;

    PageInfo<DimensionResp> queryDimension(PageDimensionReq pageDimensionReq);

    List<DimensionResp> queryDimensions(DimensionsFilter dimensionsFilter);

    void batchUpdateSensitiveLevel(MetaBatchReq metaBatchReq, User user);

    void deleteDimension(Long id, User user);

    List<DimensionResp> getDimensionInModelCluster(Long modelId);

    void sendDimensionEventBatch(List<Long> modelIds, EventType eventType);

    DataEvent getDataEvent();
}
