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:
@@ -1,42 +0,0 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using SVSim.Database.Common;
|
||||
|
||||
namespace SVSim.Database.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Singleton row (Id=1) for the current Colosseum event from /mypage/index data.colosseum_info.
|
||||
/// Time-bound — recapture per Colosseum cycle (every few weeks).
|
||||
/// </summary>
|
||||
public class ColosseumConfig : BaseEntity<int>
|
||||
{
|
||||
public string ColosseumId { get; set; } = string.Empty;
|
||||
|
||||
public string ColosseumName { get; set; } = string.Empty;
|
||||
|
||||
public string CardPoolName { get; set; } = string.Empty;
|
||||
|
||||
public string DeckFormat { get; set; } = string.Empty;
|
||||
|
||||
public DateTime StartTime { get; set; }
|
||||
|
||||
public DateTime EndTime { get; set; }
|
||||
|
||||
public string NowRound { get; set; } = string.Empty;
|
||||
|
||||
public string IsDisplayTips { get; set; } = string.Empty;
|
||||
|
||||
public string TipsId { get; set; } = string.Empty;
|
||||
|
||||
public bool IsColosseumPeriod { get; set; }
|
||||
|
||||
public bool IsRoundPeriod { get; set; }
|
||||
|
||||
public string IsNormalTwoPick { get; set; } = string.Empty;
|
||||
|
||||
public string IsSpecialMode { get; set; } = string.Empty;
|
||||
|
||||
public int IsAllCardEnabled { get; set; }
|
||||
|
||||
[Column(TypeName = "jsonb")]
|
||||
public string SalesPeriodInfo { get; set; } = "{}";
|
||||
}
|
||||
Reference in New Issue
Block a user