refactor(arena-colosseum): dedup colosseum_info source-of-truth

/mypage/index data.colosseum_info and /arena_colosseum/{top,get_fee_info}
now both project through ColosseumLobbyInfoBuilder.Build(ColosseumSeasonConfig).
One source of truth for the home-tab gating and the lobby reads — admins
flip the season on by writing to GameConfigs (per the runbook), no second
table to keep in sync.

* New ColosseumLobbyInfoBuilder — static projection from ColosseumSeasonConfig
  to the wire ColosseumLobbyInfo. Replaces ArenaColosseumController's private
  BuildColosseumInfo and MyPageController's BuildColosseumInfo(ColosseumConfig).
* MyPageController reads ColosseumSeasonConfig via IGameConfigService; the
  IGlobalsRepository.GetCurrentColosseum() call goes away.
* MyPageIndexResponse.ColosseumInfo retyped to the new ColosseumLobbyInfo.
* ColosseumSalesPeriodInfo relocated into the ArenaColosseum namespace
  alongside the rest of the family DTOs.
* Drops: Colosseums DB table (migration DropColosseumsTable), ColosseumConfig
  entity, the captured-shape Models.Dtos.ColosseumInfo DTO, ColosseumSeed,
  MyPageGlobalsImporter.ImportColosseumAsync + seed file colosseum.json,
  IGlobalsRepository.GetCurrentColosseum + impl, the two related tests.

Net: home-screen Grand Prix tab now hidden by default because the season
ships with IsColosseumPeriod=false. Full suite: 1345/1345 (was 1347 — the
2 dropped tests covered the now-dead surface).
This commit is contained in:
gamer147
2026-06-13 13:31:03 -04:00
parent 114e3da81f
commit 43a3665775
22 changed files with 4924 additions and 413 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,50 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace SVSim.Database.Migrations
{
/// <inheritdoc />
public partial class DropColosseumsTable : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Colosseums");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Colosseums",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false),
CardPoolName = table.Column<string>(type: "text", nullable: false),
ColosseumId = table.Column<string>(type: "text", nullable: false),
ColosseumName = table.Column<string>(type: "text", nullable: false),
DateCreated = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
DateUpdated = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
DeckFormat = table.Column<string>(type: "text", nullable: false),
EndTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
IsAllCardEnabled = table.Column<int>(type: "integer", nullable: false),
IsColosseumPeriod = table.Column<bool>(type: "boolean", nullable: false),
IsDisplayTips = table.Column<string>(type: "text", nullable: false),
IsNormalTwoPick = table.Column<string>(type: "text", nullable: false),
IsRoundPeriod = table.Column<bool>(type: "boolean", nullable: false),
IsSpecialMode = table.Column<string>(type: "text", nullable: false),
NowRound = table.Column<string>(type: "text", nullable: false),
SalesPeriodInfo = table.Column<string>(type: "jsonb", nullable: false),
StartTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
TipsId = table.Column<string>(type: "text", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Colosseums", x => x.Id);
});
}
}
}

View File

@@ -1005,77 +1005,6 @@ namespace SVSim.Database.Migrations
b.ToTable("ColosseumAvatarDecks");
});
modelBuilder.Entity("SVSim.Database.Models.ColosseumConfig", b =>
{
b.Property<int>("Id")
.HasColumnType("integer");
b.Property<string>("CardPoolName")
.IsRequired()
.HasColumnType("text");
b.Property<string>("ColosseumId")
.IsRequired()
.HasColumnType("text");
b.Property<string>("ColosseumName")
.IsRequired()
.HasColumnType("text");
b.Property<DateTime>("DateCreated")
.HasColumnType("timestamp with time zone");
b.Property<DateTime?>("DateUpdated")
.HasColumnType("timestamp with time zone");
b.Property<string>("DeckFormat")
.IsRequired()
.HasColumnType("text");
b.Property<DateTime>("EndTime")
.HasColumnType("timestamp with time zone");
b.Property<int>("IsAllCardEnabled")
.HasColumnType("integer");
b.Property<bool>("IsColosseumPeriod")
.HasColumnType("boolean");
b.Property<string>("IsDisplayTips")
.IsRequired()
.HasColumnType("text");
b.Property<string>("IsNormalTwoPick")
.IsRequired()
.HasColumnType("text");
b.Property<bool>("IsRoundPeriod")
.HasColumnType("boolean");
b.Property<string>("IsSpecialMode")
.IsRequired()
.HasColumnType("text");
b.Property<string>("NowRound")
.IsRequired()
.HasColumnType("text");
b.Property<string>("SalesPeriodInfo")
.IsRequired()
.HasColumnType("jsonb");
b.Property<DateTime>("StartTime")
.HasColumnType("timestamp with time zone");
b.Property<string>("TipsId")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("Colosseums");
});
modelBuilder.Entity("SVSim.Database.Models.ColosseumHofDeck", b =>
{
b.Property<long>("Id")