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 HashSet Roles { get; set; } = [];
public HashSet Posts { get; set; } = [];
public HashSet Organizations { get; set; } = [];
public HashSet PostCodes { get; set; } = [];
public HashSet RoleCodes { get; set; } = [];
public HashSet PermissionCodes { get; set; } = [];
}
public class UserDto
{
///
/// 主键ID
///
public Guid Id { get; set; }
public bool IsDeleted { get; }
public DateTime CreationTime { get; } = DateTime.Now;
public Guid? CreatorId { get; }
public DateTime? LastModificationTime { get; }
public Guid? LastModifierId { get; }
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; }
}