Add database layer (EF Core + Postgres) and Blazor Server admin site
- SOR.Database: 5 bounded-context DbContexts (identity, catalog, collection, bazaar, chat), all entities/enums, JSONB for card abilities, ServiceRegistration with per-context connection string fallback to "Default" - SOR.Admin: Blazor Server (.NET 8) — card editor, account management, bazaar overview, feature flags; Identity + cookie auth; FallbackPolicy requires Admin/SuperAdmin role; login via minimal API form POST endpoint - Directory.Packages.props: add Microsoft.AspNetCore.Identity.EntityFrameworkCore - SOR.slnx: add SOR.Admin + SOR.Database to solution (11 projects, 0 errors, 0 warnings) 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>
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
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; }
|
||||
}
|
||||
Reference in New Issue
Block a user