You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
1.2 KiB
C#

using System;
using System.Collections.Generic;
using System.Text;
using Admin.Core.Model.Sys;
namespace Admin.Core.Model
{
/// <summary>
/// 角色视图
/// </summary>
public class RoleView
{
/// <summary>
/// 角色信息
/// </summary>
public SysRole SysRole { get; set; } = new SysRole();
/// <summary>
/// 菜单组
/// </summary>
public int?[] MenuIds { get; set; }
/// <summary>
/// 部门组(数据权限)
/// </summary>
public int?[] DeptIds { get; set; }
/// <summary>
/// 是否为管理员
/// </summary>
/// <param name="roleId"></param>
/// <returns></returns>
public static bool IsAdmin(int? roleId)
{
return roleId == 1;
}
/// <summary>
/// 管理员
/// </summary>
/// <returns>管理员ID</returns>
public static int Admin()
{
return 1;
}
}
/// <summary>
/// 角色视图
/// </summary>
public class RoleModel : SysRole
{
/// <summary>
/// 数据标识
/// </summary>
public bool Flag { get; set; } = false;
}
}