using System; using System.Collections.Generic; using System.Text; using Admin.Core.Model.Sys; namespace Admin.Core.Model { /// /// 用户视图 /// public class UserView { /// /// 用户信息 /// public SysUser SysUser { get; set; } = new SysUser(); /// /// 部门对象 /// public SysDept Dept { get; set; } = new SysDept(); /// /// 角色对象 /// public List Roles { get; set; } = new List(); /// /// 角色组 public int?[] RoleIds { get; set; } /// /// 岗位对象 /// public List Posts { get; set; } = new List(); /// /// 岗位组 public int?[] PostIds { get; set; } /// /// 是否为管理员 /// /// /// public static bool IsAdmin(int userId) { return 1 == userId; } /// /// 管理员 /// /// 管理员ID public int Admin { get { return 1; } } } /// /// 用户数据 /// public class UserModel : SysUser { /// /// 部门名称 /// public string DeptName { get; set; } } }