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.
34 lines
1.3 KiB
C#
34 lines
1.3 KiB
C#
using System.Text.Json.Serialization;
|
|
using MessagePack;
|
|
|
|
namespace SVSim.EmulatedEntrypoint.Models.Dtos.ArenaColosseum;
|
|
|
|
/// <summary>
|
|
/// Per-viewer Colosseum state. All fields optional — when the viewer has no run, ALL fields
|
|
/// are null and the global <c>WhenWritingNull</c> policy renders this as <c>{}</c>, which
|
|
/// the client's <c>SetColosseumOwnStatus</c> short-circuits with <c>status.Count != 0</c>.
|
|
/// </summary>
|
|
[MessagePackObject]
|
|
public class ColosseumOwnStatus
|
|
{
|
|
[JsonPropertyName("rest_entry_num")] [Key("rest_entry_num")]
|
|
public int? RestEntryNum { get; set; }
|
|
|
|
[JsonPropertyName("now_round_id")] [Key("now_round_id")]
|
|
public int? NowRoundId { get; set; }
|
|
|
|
[JsonPropertyName("next_round_id")] [Key("next_round_id")]
|
|
public int? NextRoundId { get; set; }
|
|
|
|
[JsonPropertyName("is_last_day")] [Key("is_last_day")]
|
|
public bool? IsLastDay { get; set; }
|
|
|
|
[JsonPropertyName("is_champion")] [Key("is_champion")]
|
|
public bool? IsChampion { get; set; }
|
|
|
|
/// <summary>Only present when <see cref="IsChampion"/> is true — client uses it to overwrite
|
|
/// <c>ColosseumData.Name</c> for the champion screen.</summary>
|
|
[JsonPropertyName("colosseum_name")] [Key("colosseum_name")]
|
|
public string? ColosseumName { get; set; }
|
|
}
|