using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ARW.Model.System
{
///
/// 登录用户信息存储
///
public class LoginUser
{
public long UserId { get; set; }
public long DeptId { get; set; }
public string UserName { get; set; }
public string UserPhone { get; set; }
public bool IsApi { get; set; }
///
/// 角色集合
///
public List RoleIds { get; set; }
///
/// 角色集合(数据权限过滤使用)
///
public List Roles { get; set; }
///
/// 权限集合
///
public List Permissions { get; set; } = new List();
public LoginUser()
{
}
public LoginUser(SysUser user, List roles, List permissions)
{
UserId = user.UserId;
UserName = user.UserName;
DeptId = user.DeptId;
Roles = roles;
RoleIds = roles.Select(f => f.RoleKey).ToList();
Permissions = permissions;
}
}
}