Files
sor/Server/src/SOR.Database/Entities/Identity/Account.cs
T
348c37b9b5 Add SOR.Bazaar service — store, P2P marketplace, auction house, cosmetics
New project: SOR.Bazaar (12 message handlers)
  Store:       get_store, buy_booster_pack, buy_prebuilt_deck, buy_cosmetic, get_my_balance
  Marketplace: get_listings, get_my_listings, list_card, cancel_listing,
               buy_listing (shared-tx atomicity), place_bid (shared-tx + refund),
               get_transactions

New DB entities:
  BazaarDb:    Cosmetic, PurchaseRecord, BoosterPackCardGrant, AuctionBid
  CollectionDb: PlayerCosmetic
  IdentityDb:  Account.OriginPoints

BoosterPack gets CardSetId for set-scoped card pool draws.
BazaarEnums: PurchaseProductType, CosmeticType.

3 EF migrations applied to pg-forge-01:
  AddOriginPoints, AddBazaarCosmetics, AddPlayerCosmetics

Admin pages: CosmeticsPage, CosmeticEditor, PurchaseRecordsPage (with
  expandable booster pack card grant rows), NavMenu Bazaar submenu updates.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-02-25 19:02:59 -05:00

42 lines
1.6 KiB
C#

namespace SOR.Database.Entities.Identity;
using Microsoft.AspNetCore.Identity;
/// <summary>
/// Extends ASP.NET Core Identity's IdentityUser with SOR-specific profile fields.
///
/// Identity manages: email, password hash, lockout, two-factor, external logins.
/// We add: display name (in-game handle), avatar CDN URL, audit timestamps.
///
/// Ban handling uses Identity's built-in LockoutEnd + LockoutEnabled — no
/// separate ban table needed for basic bans. A separate audit log of ban
/// actions can be added later.
/// </summary>
public sealed class Account : IdentityUser<Guid>
{
/// <summary>Publicly visible in-game display name (not the login email).</summary>
public string? DisplayName { get; set; }
/// <summary>CDN URL to the player's avatar image.</summary>
public string? AvatarCdnUrl { get; set; }
/// <summary>UTC time the account was first created.</summary>
public DateTimeOffset CreatedAt { get; set; }
/// <summary>UTC time of the most recent successful login.</summary>
public DateTimeOffset? LastLoginAt { get; set; }
/// <summary>
/// Set when the player completes the starter deck selection during onboarding.
/// Null means they have not yet chosen their starter deck.
/// </summary>
public DateTimeOffset? StarterDeckSelectedAt { get; set; }
/// <summary>
/// In-game earned currency balance (Origin Points / Gold).
/// Earned through gameplay; can also be purchased from the bazaar store.
/// Spent on booster packs, prebuilt decks, cosmetics, and P2P listings.
/// </summary>
public int OriginPoints { get; set; }
}