using NPin.Framework.Upms.Domain.Shared.Enums; namespace NPin.Framework.Upms.Domain.Shared.Dtos; /// /// 完整用户信息Dto /// 包括所有关联关系 /// public class UserFullDto { public UserDto User { get; set; } = new(); // Relations public List Roles { get; set; } = []; public List Posts { get; set; } = []; public List Organizations { get; set; } = []; public HashSet RoleCodes { get; set; } = []; public HashSet PostCodes { get; set; } = []; public HashSet OrganizationCodes { get; set; } = []; public HashSet PermissionCodes { get; set; } = []; } public class UserDto { /// /// 主键ID /// public Guid Id { get; set; } public bool IsDeleted { get; set; } public DateTime CreationTime { get; } = DateTime.Now; public Guid? CreatorId { get; set; } public DateTime? LastModificationTime { get; set; } public Guid? LastModifierId { get; set; } public bool IsEnabled { get; set; } public int OrderNum { get; set; } public string Username { get; set; } = string.Empty; public string PhoneNumber { get; set; } public string? Email { get; set; } public string? Nickname { get; set; } public string Password { get; set; } = string.Empty; public string Salt { get; set; } = string.Empty; public string? Introduction { get; set; } public GenderEnum Gender { get; set; } = GenderEnum.Secrecy; public string? IpAddr { get; set; } public string? Avatar { get; set; } // For user (metadata) public Dictionary Metadata { get; set; } }