using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace SolarPower.Models.Role { public enum RoleLayerEnum : byte { PlatformAdmin = 0, //平台管理員 PlatformUser = 1, //平台使用者 CompanyAdmin = 2, //公司管理員 CompanyUser = 3 //公司使用者 } public class Role : Created { public int Id { get; set; } public byte Deleted { get; set; } public int CompanyId { get; set; } public string Name { get; set; } public byte Layer { get; set; } } /// /// 使用者DataTable /// public class RoleDateTable : Role { public string CompanyName { get; set; } public string CreatorName { get; set; } public string Function { get; set; } } /// /// 角色下拉式選單 /// public class RoleSelectItemList { public string Text { get; set; } public string Value { get; set; } } public class PostRoleFilter { public int SelectedCompanyId { get; set; } public string Name { get; set; } } public class PostRole { public int Id { get; set; } public int SelectedCompanyId { get; set; } public string Name { get; set; } } public class UpdateRole : Updated { public int SelectedCompanyId { get; set; } public string Name { get; set; } } /// /// 賦予公司的權限池 /// public class CompanyAuthPage { public int Id { get; set; } public int CompanyId { get; set; } public string AuthCode { get; set; } public string AuthPageMainName { get; set; } public string AuthPageSubName { get; set; } } /// /// 角色權限DataTable /// public class RoleAuth: Created { public int Id { get; set; } public string AuthCode { get; set; } } /// /// 角色權限DataTable /// public class RoleAuthDataTable : RoleAuth { public string CompanyName { get; set; } //公司名稱 public string RoleName { get; set; } //角色名稱 public string AuthPageSubName { get; set; } //權限功能名稱 public string CreatorName { get; set; } //建立者名稱 } /// /// 角色權限頁面搜尋條件 /// public class PostRoleAuthFilter { public int SelectedCompanyId { get; set; } public int SelectedRoleId { get; set; } } public class AuthPage { public string AuthCode { get; set; } public string MainName { get; set; } public string SubName { get; set; } } public class PostRoleAuth { public int SelectedRoleId { get; set; } public List CheckAuths { get; set; } } public class PostDeleteRoleAuth { public int RoleId { get; set; } public string AuthCode { get; set; } } }