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