namespace Vanguard.Server.Meta; public sealed class UserEntity { public Guid Id { get; set; } public string UserName { get; set; } = string.Empty; public string NormalizedUserName { get; set; } = string.Empty; public string PasswordHash { get; set; } = string.Empty; public DateTimeOffset CreatedAt { get; set; } public DateTimeOffset? LastLoginAt { get; set; } public bool OnboardingCompleted { get; set; } public string? SelectedTrialDeckId { get; set; } public int RankedMmr { get; set; } = 1000; public int CasualMmr { get; set; } = 1000; public int Matches { get; set; } public int Wins { get; set; } public int Xp { get; set; } } public sealed class RefreshTokenEntity { public Guid Id { get; set; } public Guid UserId { get; set; } public string TokenHash { get; set; } = string.Empty; public DateTimeOffset CreatedAt { get; set; } public DateTimeOffset ExpiresAt { get; set; } public DateTimeOffset? RevokedAt { get; set; } public string? ReplacedByHash { get; set; } } public sealed class CollectionEntity { public Guid UserId { get; set; } public string PrintingId { get; set; } = string.Empty; public int Count { get; set; } } public sealed class DeckEntity { public Guid Id { get; set; } public Guid UserId { get; set; } public string Name { get; set; } = string.Empty; public string Format { get; set; } = "classic"; public string CardsJson { get; set; } = "[]"; public DateTimeOffset CreatedAt { get; set; } public DateTimeOffset UpdatedAt { get; set; } public string? ShareCode { get; set; } } public sealed class TransactionEntity { public Guid Id { get; set; } public Guid UserId { get; set; } public string Currency { get; set; } = string.Empty; public int Amount { get; set; } public string Reason { get; set; } = string.Empty; public string IdempotencyKey { get; set; } = string.Empty; public DateTimeOffset CreatedAt { get; set; } public string? MetadataJson { get; set; } } public sealed class BoosterOpeningEntity { public Guid Id { get; set; } public Guid UserId { get; set; } public string IdempotencyKey { get; set; } = string.Empty; public string Payment { get; set; } = string.Empty; public string CardsJson { get; set; } = "[]"; public DateTimeOffset CreatedAt { get; set; } } public sealed class TrialDeckOwnershipEntity { public Guid UserId { get; set; } public string DeckId { get; set; } = string.Empty; public DateTimeOffset AcquiredAt { get; set; } } public sealed class MatchHistoryEntity { public Guid Id { get; set; } public Guid UserId { get; set; } public string MatchId { get; set; } = string.Empty; public string Mode { get; set; } = string.Empty; public string OpponentName { get; set; } = string.Empty; public string Result { get; set; } = string.Empty; public int Gold { get; set; } public int Xp { get; set; } public int MmrBefore { get; set; } public int MmrAfter { get; set; } public string FinishReason { get; set; } = string.Empty; public DateTimeOffset CreatedAt { get; set; } }