Files
SVSimServer/SVSim.EmulatedEntrypoint/Models/Dtos/BattlePass/BattlePassProductDto.cs
gamer147 0ceab721e9 feat(bp): /battle_pass/item_list — derives product per active season
Adds BattlePassSalesPeriodInfoDto, BattlePassProductDto, BattlePassItemListResponse DTOs,
GetItemListAsync on BattlePassService (one product if not premium + CanPurchase, empty if
already premium or off-season), and the /battle_pass/item_list controller action.
2 new integration tests; all 408 pass.
2026-05-26 23:26:46 -04:00

44 lines
1.4 KiB
C#

using MessagePack;
using System.Text.Json.Serialization;
namespace SVSim.EmulatedEntrypoint.Models.Dtos.BattlePass;
/// <summary>
/// One product in /battle_pass/item_list.products[] (Wizard/BattlePassPurchaseInfoTask.cs:32-43).
/// Numerics on this DTO are numeric on the wire (the client uses .ToInt() and the captured
/// shape isn't string-typed here).
/// </summary>
[MessagePackObject]
public class BattlePassProductDto
{
[JsonPropertyName("id")]
[Key("id")]
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
public int Id { get; set; }
[JsonPropertyName("season_id")]
[Key("season_id")]
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
public int SeasonId { get; set; }
[JsonPropertyName("name")]
[Key("name")]
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
public string Name { get; set; } = "";
[JsonPropertyName("price_crystal")]
[Key("price_crystal")]
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
public int PriceCrystal { get; set; }
[JsonPropertyName("description")]
[Key("description")]
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
public string Description { get; set; } = "";
[JsonPropertyName("sales_period_info")]
[Key("sales_period_info")]
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
public BattlePassSalesPeriodInfoDto SalesPeriodInfo { get; set; } = new();
}