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

123 lines
3.0 KiB
C#

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; }
}
/// <summary>
/// 使用者DataTable
/// </summary>
public class RoleDateTable : Role
{
public string CompanyName { get; set; }
public string CreatorName { get; set; }
}
/// <summary>
/// 角色下拉式選單
/// </summary>
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; }
}
/// <summary>
/// 賦予公司的權限池
/// </summary>
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; }
}
/// <summary>
/// 角色權限DataTable
/// </summary>
public class RoleAuth: Created
{
public int Id { get; set; }
public string AuthCode { get; set; }
}
/// <summary>
/// 角色權限DataTable
/// </summary>
public class RoleAuthDataTable : RoleAuth
{
public string CompanyName { get; set; } //公司名稱
public string RoleName { get; set; } //角色名稱
public string AuthPageSubName { get; set; } //權限功能名稱
public string CreatorName { get; set; } //建立者名稱
}
/// <summary>
/// 角色權限頁面搜尋條件
/// </summary>
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<string> CheckAuths { get; set; }
}
public class PostDeleteRoleAuth
{
public int RoleId { get; set; }
public string AuthCode { get; set; }
}
}