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:
@@ -72,9 +72,6 @@ public class GlobalsRepository : IGlobalsRepository
|
||||
.ThenBy(e => e.Id)
|
||||
.ToListAsync();
|
||||
|
||||
public Task<ColosseumConfig?> GetCurrentColosseum() =>
|
||||
_dbContext.Colosseums.AsNoTracking().FirstOrDefaultAsync(e => e.Id == 1);
|
||||
|
||||
public Task<SealedConfig?> GetCurrentSealedSeason() =>
|
||||
_dbContext.SealedSeasons.AsNoTracking().FirstOrDefaultAsync(e => e.Id == 1);
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@ public interface IGlobalsRepository
|
||||
Task<List<DailyLoginBonusEntry>> GetDailyLoginBonus();
|
||||
Task<List<BannerEntry>> GetBanners();
|
||||
Task<IReadOnlyList<HomeDialogEntry>> GetActiveHomeDialogsAsync(DateTime nowUtc);
|
||||
Task<ColosseumConfig?> GetCurrentColosseum();
|
||||
Task<SealedConfig?> GetCurrentSealedSeason();
|
||||
Task<MasterPointRankingPeriodEntry?> GetCurrentMasterPointPeriod();
|
||||
Task<List<SpecialDeckFormatEntry>> GetActiveSpecialDeckFormats();
|
||||
|
||||
Reference in New Issue
Block a user