feat: 用户管理后端与日志库迁移

This commit is contained in:
2025-12-27 06:23:03 +08:00
parent 0ff2794667
commit b2a90cf8af
57 changed files with 4117 additions and 33 deletions

View File

@@ -0,0 +1,73 @@
using System.Text.Json.Serialization;
using TakeoutSaaS.Domain.Identity.Enums;
using TakeoutSaaS.Shared.Abstractions.Serialization;
namespace TakeoutSaaS.Application.Identity.Contracts;
/// <summary>
/// 用户列表项 DTO。
/// </summary>
public sealed record UserListItemDto
{
/// <summary>
/// 用户 ID。
/// </summary>
[JsonConverter(typeof(SnowflakeIdJsonConverter))]
public long UserId { get; init; }
/// <summary>
/// 租户 ID。
/// </summary>
[JsonConverter(typeof(SnowflakeIdJsonConverter))]
public long TenantId { get; init; }
/// <summary>
/// 登录账号。
/// </summary>
public string Account { get; init; } = string.Empty;
/// <summary>
/// 展示名称。
/// </summary>
public string DisplayName { get; init; } = string.Empty;
/// <summary>
/// 手机号。
/// </summary>
public string? Phone { get; init; }
/// <summary>
/// 邮箱。
/// </summary>
public string? Email { get; init; }
/// <summary>
/// 用户状态。
/// </summary>
public IdentityUserStatus Status { get; init; }
/// <summary>
/// 是否处于锁定状态。
/// </summary>
public bool IsLocked { get; init; }
/// <summary>
/// 是否已删除。
/// </summary>
public bool IsDeleted { get; init; }
/// <summary>
/// 角色编码列表。
/// </summary>
public string[] Roles { get; init; } = Array.Empty<string>();
/// <summary>
/// 创建时间UTC
/// </summary>
public DateTime CreatedAt { get; init; }
/// <summary>
/// 最近登录时间UTC
/// </summary>
public DateTime? LastLoginAt { get; init; }
}