Deck list work

This commit is contained in:
gamer147
2026-05-23 19:57:34 -04:00
parent 66184b3685
commit d3b2970e11
41 changed files with 70683 additions and 81 deletions

View File

@@ -0,0 +1,51 @@
using SVSim.Database.Common;
namespace SVSim.Database.Models;
/// <summary>
/// One row of the Steam/PC storefront item list from /payment_pc/item_list data. Singleton per
/// product. Id is the wire's <c>record_id</c> (prod's auto-increment, genuinely stable across
/// captures — same upsert-by-wire-id pattern as MasterPointRankingPeriodEntry, not the synthetic-
/// ordinal Banner pattern).
///
/// All numeric fields land in typed columns; the controller stringifies them on the way out to
/// match prod's PHP-stringified wire convention.
/// </summary>
public class PaymentItemEntry : BaseEntity<int>
{
/// <summary>Internal product id (different from store_product_id). Used by the client at
/// PaymentItemListTask.cs:50,58,64,67 as a per-tier discriminator.</summary>
public int ProductId { get; set; }
/// <summary>User-visible SKU (e.g. 10011 for "60-crystal set"). Wire dict key.</summary>
public long StoreProductId { get; set; }
public string Name { get; set; } = string.Empty;
public string Text { get; set; } = string.Empty;
public decimal Price { get; set; }
public int ChargeCrystalNum { get; set; }
public int FreeCrystalNum { get; set; }
public int PurchaseLimit { get; set; }
/// <summary>0/1 — special_shop_flag on the wire (stringified).</summary>
public int SpecialShopFlag { get; set; }
public string ImageName { get; set; } = string.Empty;
public DateTime StartTime { get; set; }
public DateTime EndTime { get; set; }
public int RemainingTime { get; set; }
/// <summary>0/1 — is_resale_product on the wire (stringified).</summary>
public int IsResaleProduct { get; set; }
/// <summary>Nullable — prod sends empty string when unset; we store null and emit "".</summary>
public DateTime? ResaleStartDate { get; set; }
}

View File

@@ -0,0 +1,17 @@
using SVSim.Database.Common;
namespace SVSim.Database.Models;
/// <summary>
/// One entry from /mypage/index data.room_type_in_session.special_deck_format_list. A list of deck-format
/// codes that have a current "special" window (e.g. format "5" valid until 2030-06-26). Id is a synthetic
/// ordinal — the wire has no explicit identifier, and ImportRoomTypeInSession follows the same clear-and-
/// rewrite pattern as ImportBanners.
/// </summary>
public class SpecialDeckFormatEntry : BaseEntity<int>
{
/// <summary>Wire is string per prod's PHP convention even though it looks numeric (e.g. "5").</summary>
public string DeckFormat { get; set; } = string.Empty;
public DateTime EndTime { get; set; }
}