using MessagePack; using System.Text.Json.Serialization; namespace SVSim.EmulatedEntrypoint.Models.Dtos; /// /// Current arena season config. Shape derived from 2026-05-23 prod capture /// (arena_info[0].format_info). /// /// Wire mixes types: two_pick_type and last_card_pack_set_id are strings /// (PHP-backend stringification), announce_id is an int, and the times use /// space-separated "yyyy-MM-dd HH:mm:ss" rather than ISO. Numeric-typed properties use /// AllowReadingFromString on the controller's JsonSerializerOptions so string-quoted /// ints deserialize cleanly out of the seeded jsonb. /// [MessagePackObject] public class ArenaFormatInfo { /// PickTwoFormat as int (0=None,1=Normal,2=Backdraft,3=Cube,4=Chaos,...). [JsonPropertyName("two_pick_type")] [Key("two_pick_type")] public int TwoPickType { get; set; } [JsonPropertyName("card_pool_name")] [Key("card_pool_name")] public string CardPoolName { get; set; } = string.Empty; [JsonPropertyName("announce_id")] [Key("announce_id")] public int AnnounceId { get; set; } /// The current card pack set id, e.g. "10029". String on the wire. [JsonPropertyName("last_card_pack_set_id")] [Key("last_card_pack_set_id")] public string LastCardPackSetId { get; set; } = string.Empty; /// /// Wire format is "yyyy-MM-dd HH:mm:ss" (space-separated, prod's PHP convention) — NOT ISO. /// Stored as string here so the jsonb passthrough survives byte-for-byte; the client's /// DateTime.Parse accepts either format on the receiving side. /// [JsonPropertyName("start_time")] [Key("start_time")] public string StartTime { get; set; } = string.Empty; [JsonPropertyName("end_time")] [Key("end_time")] public string EndTime { get; set; } = string.Empty; }