You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
1.3 KiB
65 lines
1.3 KiB
|
7 months ago
|
using System.Collections.Generic;
|
||
|
|
|
||
|
|
namespace CellularManagement.Application.Features.Auth.Models;
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// 用户信息
|
||
|
|
/// </summary>
|
||
|
|
public class UserInfo
|
||
|
|
{
|
||
|
|
/// <summary>
|
||
|
|
/// 用户ID
|
||
|
|
/// </summary>
|
||
|
|
public string Id { get; }
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// 用户名
|
||
|
|
/// </summary>
|
||
|
|
public string UserName { get; }
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// 真实姓名
|
||
|
|
/// </summary>
|
||
|
|
public string? RealName { get; }
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// 邮箱
|
||
|
|
/// </summary>
|
||
|
|
public string Email { get; }
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// 手机号
|
||
|
|
/// </summary>
|
||
|
|
public string? PhoneNumber { get; }
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// 角色列表
|
||
|
|
/// </summary>
|
||
|
|
public IReadOnlyList<string> Roles { get; }
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// 权限字典
|
||
|
|
/// </summary>
|
||
|
|
public IReadOnlyDictionary<string, bool> Permissions { get; }
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// 初始化用户信息
|
||
|
|
/// </summary>
|
||
|
|
public UserInfo(
|
||
|
|
string id,
|
||
|
|
string userName,
|
||
|
|
string? realName,
|
||
|
|
string email,
|
||
|
|
string? phoneNumber,
|
||
|
|
IReadOnlyList<string> roles,
|
||
|
|
IReadOnlyDictionary<string, bool> permissions)
|
||
|
|
{
|
||
|
|
Id = id;
|
||
|
|
UserName = userName;
|
||
|
|
RealName = realName;
|
||
|
|
Email = email;
|
||
|
|
PhoneNumber = phoneNumber;
|
||
|
|
Roles = roles;
|
||
|
|
Permissions = permissions;
|
||
|
|
}
|
||
|
|
}
|