feat(arena-colosseum): lobby + constructed entry (phase 1)

Closes 5 of arena-colosseum's 16 spec shapes (1/16 → 6/16). Lobby reads
(/top, /get_fee_info, /event_info) render an empty "no event scheduled"
payload by default; /entry + /register_deck activate via admin-flipped
ColosseumSeason + ColosseumRounds config sections.

* Schema: ViewerArenaColosseumRun standalone table (unique on ViewerId)
  with jsonb run-state columns mirroring ViewerArenaTwoPickRun.
* Config sections: ColosseumSeasonConfig (event-level), ColosseumRoundsConfig
  (the 3-round bracket). Empty defaults — IsColosseumPeriod=false.
* Migration AddArenaColosseumRun (DDL only; seed rows come from the section
  ShippedDefaults via EnsureSeedDataAsync).
* DTOs: ColosseumLobbyInfo (round-level, /top + /get_fee_info), ColosseumEventInfo
  (event-level, /event_info), ColosseumOwnStatus (shared status block),
  ColosseumEntryRef, ColosseumFeeList, ColosseumUserDeck, ColosseumBattleResults,
  ColosseumRoundDetail + ColosseumGroupRow. EventInfoResponse uses explicit
  [JsonPropertyName("1"|"2"|"3")] for the string-keyed rounds shape per spec.
* Controller: ArenaColosseumController replaces the 1-action stub with
  the five lifecycle endpoints. /top emits leader_skin_id even when 0
  (project_wire_null_policy override).
* Tests: 11 controller-level tests + 6 config round-trip tests covering
  empty-season payloads, run-seeded /top round-trip, crystal/rupy entry
  debits, now_round_id mismatch rejection, deck_no_list round-trip + reject.
This commit is contained in:
gamer147
2026-06-13 12:16:22 -04:00
parent a5fe484775
commit 110867358c
30 changed files with 6474 additions and 42 deletions

View File

@@ -2766,6 +2766,111 @@ namespace SVSim.Database.Migrations
b.ToTable("ViewerAcquireHistory");
});
modelBuilder.Entity("SVSim.Database.Models.ViewerArenaColosseumRun", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
b.Property<int>("BattleCountThisRound")
.HasColumnType("integer");
b.Property<int>("BreakthroughNumberThisRound")
.HasColumnType("integer");
b.Property<string>("CandidateClassIdsJson")
.IsRequired()
.HasColumnType("jsonb");
b.Property<int>("ChaosId")
.HasColumnType("integer");
b.Property<int>("ClassId")
.HasColumnType("integer");
b.Property<int>("ConsumeItemType")
.HasColumnType("integer");
b.Property<DateTime>("CreatedAt")
.HasColumnType("timestamp with time zone");
b.Property<int>("DeckFormat")
.HasColumnType("integer");
b.Property<long>("EntryId")
.HasColumnType("bigint");
b.Property<bool>("IsChampion")
.HasColumnType("boolean");
b.Property<bool>("IsPublished")
.HasColumnType("boolean");
b.Property<bool>("IsRankMatching")
.HasColumnType("boolean");
b.Property<bool>("IsSelectCompleted")
.HasColumnType("boolean");
b.Property<long>("LeaderSkinId")
.HasColumnType("bigint");
b.Property<int>("LossCount")
.HasColumnType("integer");
b.Property<int>("MaxBattleCountThisRound")
.HasColumnType("integer");
b.Property<long>("NextCandidateId")
.HasColumnType("bigint");
b.Property<string>("PendingPickSetsJson")
.IsRequired()
.HasColumnType("jsonb");
b.Property<string>("RegisteredDeckNoListJson")
.IsRequired()
.HasColumnType("jsonb");
b.Property<int>("RestEntryNum")
.HasColumnType("integer");
b.Property<string>("ResultListJson")
.IsRequired()
.HasColumnType("jsonb");
b.Property<int>("RoundId")
.HasColumnType("integer");
b.Property<int>("SeasonId")
.HasColumnType("integer");
b.Property<int>("SelectTurn")
.HasColumnType("integer");
b.Property<string>("SelectedCardIdsJson")
.IsRequired()
.HasColumnType("jsonb");
b.Property<DateTime>("UpdatedAt")
.HasColumnType("timestamp with time zone");
b.Property<long>("ViewerId")
.HasColumnType("bigint");
b.Property<int>("WinCount")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("ViewerId")
.IsUnique();
b.ToTable("ViewerArenaColosseumRuns");
});
modelBuilder.Entity("SVSim.Database.Models.ViewerArenaTwoPickRun", b =>
{
b.Property<long>("Id")