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:
dingo
2026-02-25 07:48:24 -05:00
co-authored by Claude Happy
parent d21adbc8d0
commit ee2891d38e
45 changed files with 2490 additions and 0 deletions
@@ -0,0 +1,30 @@
namespace SOR.Database.Entities.Catalog;
/// <summary>
/// Binds a named in-game action to an animation CDN asset for a specific card.
///
/// ActionName is a free-form string matching the action identifiers used by the
/// game engine and client renderer, e.g.:
/// "idle", "attack", "defend", "death", "channel",
/// "ability_0", "ability_1" (per ability index),
/// "ascend", "transition"
///
/// This keeps animation bindings flexible — adding new action types requires
/// no schema change, only a new row per card.
/// </summary>
public sealed class CardAnimationBinding
{
public Guid Id { get; set; } = Guid.NewGuid();
public Guid CardDefinitionId { get; set; }
/// <summary>
/// Action identifier string as expected by the client renderer.
/// Examples: "idle", "attack", "death", "ability_0", "ascend".
/// </summary>
public string ActionName { get; set; } = string.Empty;
/// <summary>CDN URL to the animation file (glTF animation, Spine, etc.).</summary>
public string AnimationCdnUrl { get; set; } = string.Empty;
public CardDefinition CardDefinition { get; set; } = null!;
}