Deck list work
This commit is contained in:
@@ -4,17 +4,44 @@ using System.Text.Json.Serialization;
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos;
|
||||
|
||||
/// <summary>
|
||||
/// colosseum_info on /mypage/index, consumed by
|
||||
/// ColosseumEntryInfoTask.SetColosseumInfo (Wizard/ColosseumEntryInfoTask.cs:99).
|
||||
/// colosseum_info on /mypage/index, consumed by ColosseumEntryInfoTask.SetColosseumInfo
|
||||
/// (Wizard/ColosseumEntryInfoTask.cs:99). The outer object is read unconditionally, and
|
||||
/// is_colosseum_period gates everything else. When a cup IS active, the client reads
|
||||
/// many more sub-fields inside the gate (deck_format, now_round, start_time, end_time,
|
||||
/// sales_period_info, etc.) — we now mirror the full prod shape so the gate-true branch
|
||||
/// works once we have colosseum data seeded.
|
||||
///
|
||||
/// The block is indexed unconditionally — it MUST be present, and
|
||||
/// `is_colosseum_period` MUST be set. All other fields are only read inside the
|
||||
/// `if (IsColosseumPeriod)` branch, so when no Take Two cup is active we emit
|
||||
/// the minimum payload (is_colosseum_period=false) and leave the rest defaulted.
|
||||
/// Prod-captured shape (15 fields):
|
||||
/// <code>
|
||||
/// {"colosseum_id":"165","is_display_tips":"0","tips_id":"0",
|
||||
/// "card_pool_name":"Take Two (Dragonblade–Rivenbrandt)",
|
||||
/// "is_colosseum_period":true,"is_round_period":true,"deck_format":"3",
|
||||
/// "is_normal_two_pick":"1","is_special_mode":"10","is_all_card_enabled":0,
|
||||
/// "start_time":"2026-05-21 06:00:00","colosseum_name":"Rivenbrandt Take Two Cup",
|
||||
/// "now_round":"1","end_time":"2026-05-25 19:59:59",
|
||||
/// "sales_period_info":{"sales_period_time":"2026-05-25 19:59:59"}}
|
||||
/// </code>
|
||||
/// </summary>
|
||||
[MessagePackObject]
|
||||
public class ColosseumInfo
|
||||
{
|
||||
[JsonPropertyName("colosseum_id")]
|
||||
[Key("colosseum_id")]
|
||||
public string ColosseumId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>Wire is "0"/"1" string. Client compares with == "1" (GetValueOrDefault-guarded).</summary>
|
||||
[JsonPropertyName("is_display_tips")]
|
||||
[Key("is_display_tips")]
|
||||
public string IsDisplayTips { get; set; } = "0";
|
||||
|
||||
[JsonPropertyName("tips_id")]
|
||||
[Key("tips_id")]
|
||||
public string TipsId { get; set; } = "0";
|
||||
|
||||
[JsonPropertyName("card_pool_name")]
|
||||
[Key("card_pool_name")]
|
||||
public string CardPoolName { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("is_colosseum_period")]
|
||||
[Key("is_colosseum_period")]
|
||||
public bool IsColosseumPeriod { get; set; }
|
||||
@@ -23,11 +50,15 @@ public class ColosseumInfo
|
||||
[Key("is_round_period")]
|
||||
public bool IsRoundPeriod { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Wire is a stringified int in prod (e.g. "3"). DB stores as string. Client calls
|
||||
/// <c>jsonData["deck_format"].ToInt()</c> inside the IsColosseumPeriod gate.
|
||||
/// </summary>
|
||||
[JsonPropertyName("deck_format")]
|
||||
[Key("deck_format")]
|
||||
public int DeckFormat { get; set; }
|
||||
public string DeckFormat { get; set; } = "0";
|
||||
|
||||
/// <summary>Wire is "1"/"0" string in prod. Client compares with == "1".</summary>
|
||||
/// <summary>Wire is "1"/"0" string. Client compares with == "1".</summary>
|
||||
[JsonPropertyName("is_normal_two_pick")]
|
||||
[Key("is_normal_two_pick")]
|
||||
public string IsNormalTwoPick { get; set; } = "0";
|
||||
@@ -37,7 +68,30 @@ public class ColosseumInfo
|
||||
[Key("is_special_mode")]
|
||||
public string IsSpecialMode { get; set; } = "0";
|
||||
|
||||
[JsonPropertyName("is_all_card_enabled")]
|
||||
[Key("is_all_card_enabled")]
|
||||
public int IsAllCardEnabled { get; set; }
|
||||
|
||||
/// <summary>"yyyy-MM-dd HH:mm:ss" wire format.</summary>
|
||||
[JsonPropertyName("start_time")]
|
||||
[Key("start_time")]
|
||||
public string StartTime { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("colosseum_name")]
|
||||
[Key("colosseum_name")]
|
||||
public string ColosseumName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>Round number as string (e.g. "1"). Client casts to int.</summary>
|
||||
[JsonPropertyName("now_round")]
|
||||
[Key("now_round")]
|
||||
public string NowRound { get; set; } = "0";
|
||||
|
||||
/// <summary>"yyyy-MM-dd HH:mm:ss" wire format.</summary>
|
||||
[JsonPropertyName("end_time")]
|
||||
[Key("end_time")]
|
||||
public string EndTime { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("sales_period_info")]
|
||||
[Key("sales_period_info")]
|
||||
public ColosseumSalesPeriodInfo SalesPeriodInfo { get; set; } = new();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user