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)
This commit is contained in:
@@ -3,34 +3,23 @@ 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
|
||||
{
|
||||
/// <summary>
|
||||
/// The effect shown ingame.
|
||||
/// </summary>
|
||||
[JsonPropertyName("effect_id")]
|
||||
[Key("effect_id")]
|
||||
public int EffectId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The type of reward.
|
||||
/// </summary>
|
||||
[JsonPropertyName("reward_type")]
|
||||
[Key("reward_type")]
|
||||
public int RewardType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// A more specified reward type (ie if a pack, which pack).
|
||||
/// </summary>
|
||||
[JsonPropertyName("reward_detail_id")]
|
||||
[Key("reward_detail_id")]
|
||||
public int RewardDetailId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The count of the reward.
|
||||
/// </summary>
|
||||
[JsonPropertyName("reward_number")]
|
||||
[Key("reward_number")]
|
||||
public int RewardNumber { get; set; }
|
||||
}
|
||||
[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";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user