Files
SVSimServer/SVSim.EmulatedEntrypoint/Models/Dtos/LoginBonusReward.cs
gamer147 e6e3f919a6 fix(dto): align daily_login_bonus DTOs with prod wire shape
- numeric fields ship as quoted strings (campaign_id, img, effect_id,
  reward_type, reward_detail_id, reward_number)
- DailyLoginBonus.Campaign is a List<>, not a single object
- LoginBonusCampaign.Img replaces Image (string, asset-key)
- add IsOneDayMultiRewards (SpecialData-only on client, byte-faithful)
2026-06-13 15:59:42 -04:00

26 lines
895 B
C#

using MessagePack;
using System.Text.Json.Serialization;
namespace SVSim.EmulatedEntrypoint.Models.Dtos;
/// <summary>
/// One day's reward in a login-bonus cycle. All numeric fields ship as quoted strings on
/// the wire — prod-confirmed shape from traffic_prod_tutorial.ndjson. Client uses
/// JsonData.ToInt() so it tolerates either form, but we match prod exactly.
/// </summary>
[MessagePackObject]
public class LoginBonusReward
{
[JsonPropertyName("effect_id")] [Key("effect_id")]
public string EffectId { get; set; } = "0";
[JsonPropertyName("reward_type")] [Key("reward_type")]
public string RewardType { get; set; } = "0";
[JsonPropertyName("reward_detail_id")] [Key("reward_detail_id")]
public string RewardDetailId { get; set; } = "0";
[JsonPropertyName("reward_number")] [Key("reward_number")]
public string RewardNumber { get; set; } = "0";
}