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.
27 lines
891 B
C#
27 lines
891 B
C#
using System.Text.Json.Serialization;
|
|
using MessagePack;
|
|
|
|
namespace SVSim.EmulatedEntrypoint.Models.Dtos.ArenaColosseum;
|
|
|
|
/// <summary>Lightweight deck-info shape for <c>/top</c>'s <c>user_deck[0]</c>. The client's
|
|
/// <c>DeckData.Initialize</c> consumes the canonical deck shape; this is the minimum needed
|
|
/// to render the deck preview in Phase 1.</summary>
|
|
[MessagePackObject]
|
|
public class ColosseumUserDeck
|
|
{
|
|
[JsonPropertyName("deck_id")] [Key("deck_id")]
|
|
public long DeckId { get; set; }
|
|
|
|
[JsonPropertyName("class_id")] [Key("class_id")]
|
|
public int ClassId { get; set; }
|
|
|
|
[JsonPropertyName("card_list")] [Key("card_list")]
|
|
public List<long> CardList { get; set; } = new();
|
|
|
|
[JsonPropertyName("sleeve_id")] [Key("sleeve_id")]
|
|
public long? SleeveId { get; set; }
|
|
|
|
[JsonPropertyName("skin_id")] [Key("skin_id")]
|
|
public long? SkinId { get; set; }
|
|
}
|