using SolarPower.Models; using SolarPower.Models.Role; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace SolarPower.Repository.Interface { public interface IRoleRepository : IRepositoryBase { /// /// 取得當前使用者的角色資訊 /// /// /// MyRole GetMyRoleInfoById(int id); /// /// 取得下拉式公司角色選單,須為Deleted: 0 /// /// /// Task> GetRoleSelectOptionListAsync(int companyId); /// /// 取得單一公司角色,須為Deleted: 0 /// /// /// Task GetOneRoleAsync(int id); /// /// 透過搜尋條件,查詢過濾後的角色 /// /// /// Task> GetAllByFilterAsync(PostRoleFilter filter); /// /// 更新公司角色名稱 /// /// /// Task UpdateRoleAsync(UpdateRole update, List properties); /// /// 透過角色編號,取得所有權限功能 /// /// /// Task> GetAllAuthByRoleIdAsync(int roleId); /// /// 透過公司編號,取得被賦予的權限池 /// /// /// Task> GetAllCompanyAuthPageAsync(int companyId); /// /// 查詢公司權限池裡面該角色尚未擁有的權限 /// /// /// Task> GetRoleNotAuthPageAsync(PostRoleAuthFilter post); /// /// 新增角色權限 /// /// /// Task AddRoleAuthAsync(List entity, List properties); /// /// 實際刪除角色權限 /// /// Task PurgeOneRoleAuthAsync(int roleId, string authCode); } }