FIC_Solar/SolarPower/Repository/Interface/IRoleRepository.cs
Kai 7480fee9df 1. 修改myUser 資料
2. 公司管理上傳圖片
3. 加入電站資訊頁面
2021-06-13 18:46:10 +08:00

82 lines
2.6 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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<Role>
{
/// <summary>
/// 取得當前使用者的角色資訊
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
MyRole GetMyRoleInfoById(int id);
/// <summary>
/// 取得下拉式公司角色選單須為Deleted: 0
/// </summary>
/// <param name="filter"></param>
/// <returns></returns>
Task<List<RoleSelectItemList>> GetRoleSelectOptionListAsync(int companyId);
/// <summary>
/// 取得單一公司角色須為Deleted: 0
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
Task<Role> GetOneRoleAsync(int id);
/// <summary>
/// 透過搜尋條件,查詢過濾後的角色
/// </summary>
/// <param name="filter"></param>
/// <returns></returns>
Task<List<RoleDateTable>> GetAllByFilterAsync(PostRoleFilter filter);
/// <summary>
/// 更新公司角色名稱
/// </summary>
/// <param name="update"></param>
/// <returns></returns>
Task UpdateRoleAsync(UpdateRole update, List<string> properties);
/// <summary>
/// 透過角色編號,取得所有權限功能
/// </summary>
/// <param name="roleId"></param>
/// <returns></returns>
Task<List<RoleAuthDataTable>> GetAllAuthByRoleIdAsync(int roleId);
/// <summary>
/// 透過公司編號,取得被賦予的權限池
/// </summary>
/// <param name="companyId"></param>
/// <returns></returns>
Task<List<CompanyAuthPage>> GetAllCompanyAuthPageAsync(int companyId);
/// <summary>
/// 查詢公司權限池裡面該角色尚未擁有的權限
/// </summary>
/// <param name="post"></param>
/// <returns></returns>
Task<List<AuthPage>> GetRoleNotAuthPageAsync(PostRoleAuthFilter post);
/// <summary>
/// 新增角色權限
/// </summary>
/// <param name="post"></param>
/// <returns></returns>
Task<int> AddRoleAuthAsync(List<RoleAuth> entity, List<string> properties);
/// <summary>
/// 實際刪除角色權限
/// </summary>
/// <returns></returns>
Task PurgeOneRoleAuthAsync(int roleId, string authCode);
}
}