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,25 +3,38 @@ using System.Text.Json.Serialization;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos;
|
||||
|
||||
/// <summary>
|
||||
/// One login-bonus campaign panel. Used for normal, each campaign array entry, and (when
|
||||
/// populated) total. <c>campaign_id</c> and <c>img</c> ship as strings on the wire. Client
|
||||
/// consumers: NormalData (reads name, now_count, is_next_reward, reward[]),
|
||||
/// SpecialData (also reads start_date, end_date, img, is_one_day_multi_rewards),
|
||||
/// ContinuousData (reads only reward[]).
|
||||
/// </summary>
|
||||
[MessagePackObject]
|
||||
public class LoginBonusCampaign
|
||||
{
|
||||
[JsonPropertyName("name")]
|
||||
[Key("name")]
|
||||
[JsonPropertyName("name")] [Key("name")]
|
||||
public string Name { get; set; } = string.Empty;
|
||||
[JsonPropertyName("campaign_id")]
|
||||
[Key("campaign_id")]
|
||||
public int CampaignId { get; set; }
|
||||
[JsonPropertyName("img")]
|
||||
[Key("img")]
|
||||
public int Image { get; set; }
|
||||
[JsonPropertyName("now_count")]
|
||||
[Key("now_count")]
|
||||
|
||||
[JsonPropertyName("campaign_id")] [Key("campaign_id")]
|
||||
public string CampaignId { get; set; } = "0";
|
||||
|
||||
[JsonPropertyName("img")] [Key("img")]
|
||||
public string Img { get; set; } = "0";
|
||||
|
||||
[JsonPropertyName("now_count")] [Key("now_count")]
|
||||
public int NowCount { get; set; }
|
||||
[JsonPropertyName("is_next_reward")]
|
||||
[Key("is_next_reward")]
|
||||
|
||||
[JsonPropertyName("is_next_reward")] [Key("is_next_reward")]
|
||||
public bool IsNextReward { get; set; }
|
||||
[JsonPropertyName("reward")]
|
||||
[Key("reward")]
|
||||
public List<LoginBonusReward> Rewards { get; set; } = new List<LoginBonusReward>();
|
||||
}
|
||||
|
||||
[JsonPropertyName("reward")] [Key("reward")]
|
||||
public List<LoginBonusReward> Rewards { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// SpecialData-only on the client (SpecialData.cs:50). Server emits it on every panel
|
||||
/// for byte-faithful replay; client ignores it on Normal/Total paths.
|
||||
/// </summary>
|
||||
[JsonPropertyName("is_one_day_multi_rewards")] [Key("is_one_day_multi_rewards")]
|
||||
public bool IsOneDayMultiRewards { get; set; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user