namespace Model.Base
{
public class TokenModel
{
public long UserId { get; set; }
public long DeptId { get; set; }
public string Username { get; set; }
///
/// 角色集合
///
public List RoleIds { get; set; }
///
/// 角色集合(数据权限过滤使用)
///
public List Roles { get; set; }
///
/// Jwt过期时间
///
public DateTime ExpireTime { get; set; }
///
/// 权限集合
///
//public List Permissions { get; set; } = new List();
public TokenModel()
{
}
public TokenModel(TokenModel info, List roles)
{
UserId = info.UserId;
Username = info.Username;
DeptId = info.DeptId;
Roles = roles;
RoleIds = roles.Select(f => f.RoleKey).ToList();
}
}
public class Roles
{
public long RoleId { get; set; }
public string RoleKey { get; set; }
public int DataScope { get; set; }
}
}