package ink.wgink.service.role.dao;

import ink.wgink.exceptions.RemoveException;
import ink.wgink.exceptions.SaveException;
import ink.wgink.exceptions.SearchException;
import ink.wgink.exceptions.UpdateException;
import ink.wgink.interfaces.init.IInitBaseTable;
import ink.wgink.pojo.dtos.role.RolePermissionDTO;
import org.springframework.stereotype.Repository;

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

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: IRolePermissionDao
 * @Description: 角色权限
 * @Author: WangGeng
 * @Date: 2021/1/31 21:24
 * @Version: 1.0
 **/
@Repository
public interface IRolePermissionDao extends IInitBaseTable {

    /**
     * 新增权限角色
     *
     * @param params
     * @throws SaveException
     */
    void save(Map<String, Object> params) throws SaveException;

    /**
     * 删除权限角色
     *
     * @param params
     * @throws RemoveException
     */
    void delete(Map<String, Object> params) throws RemoveException;

    /**
     * 权限列表
     *
     * @param params
     * @return
     * @throws SearchException
     */
    List<RolePermissionDTO> list(Map<String, Object> params) throws SearchException;

    /**
     * 权限ID列表
     *
     * @param params
     * @return
     * @throws SearchException
     */
    List<String> listPermissionId(Map<String, Object> params) throws SearchException;
}
