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

import com.baomidou.mybatisplus.extension.service.IService;
import com.purui.prims.headless.api.pojo.request.BatchRoleAuthReq;
import com.purui.prims.headless.api.pojo.request.RoleAuthReq;
import com.purui.prims.headless.api.pojo.response.RoleAuthResp;
import com.purui.prims.headless.server.persistence.dataobject.RoleAuthDO;

import java.util.List;

/**
 * <p>
 * 角色权限表服务类
 * </p>
 *
 * @author charlie
 * @since 2024-07-05
 */
public interface RoleAuthService extends IService<RoleAuthDO> {

    List<RoleAuthResp> getRoleAuthList(String dataType, Integer roleId, Long dataId);

    List<RoleAuthResp> getMetricRoleAuthList(Integer roleId);

    List<RoleAuthResp> getDatasetRoleAuthList(Integer roleId);

    List<RoleAuthResp> getDimensionRoleAuthList(Integer roleId);

    List<RoleAuthResp> getDomainRoleAuthList(Integer roleId);

    boolean grant(RoleAuthReq roleAuthReq);

    boolean batchGrant(BatchRoleAuthReq roleAuthReq);
}
