115 lines
2.8 KiB
C#
115 lines
2.8 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace SolarPower.Models.Role
|
|
{
|
|
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; }
|
|
}
|
|
}
|