dto(card): CardCreate request and response
This commit is contained in:
@@ -0,0 +1,19 @@
|
|||||||
|
using MessagePack;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Requests.Card;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// POST /card/create. The single payload field is a JSON-encoded STRING (double-encoded —
|
||||||
|
/// see docs/api-spec/endpoints/post-login/card-create.md). Inner object maps
|
||||||
|
/// cardId → "<num_to_create>,<client_possession_snapshot>". Both inner values
|
||||||
|
/// are strings. Same wire format as /card/destruct; CardController parses both with the
|
||||||
|
/// shared TryParseCardCountDict helper.
|
||||||
|
/// </summary>
|
||||||
|
[MessagePackObject]
|
||||||
|
public class CardCreateRequest : BaseRequest
|
||||||
|
{
|
||||||
|
[JsonPropertyName("card_id_number_array")]
|
||||||
|
[Key("card_id_number_array")]
|
||||||
|
public string CardIdNumberArray { get; set; } = string.Empty;
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
using MessagePack;
|
||||||
|
using SVSim.EmulatedEntrypoint.Models.Dtos;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Responses.Card;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// /card/create response data. reward_list entries are POST-STATE TOTALS (the client's
|
||||||
|
/// PlayerStaticData.UpdateHaveUserGoodsNumByJsonData does direct assignment). One
|
||||||
|
/// RewardType=1 RedEther entry plus one RewardType=5 Card entry per crafted cardId,
|
||||||
|
/// plus cascade entries for any CardCosmeticReward rows attached to the crafted cards.
|
||||||
|
/// </summary>
|
||||||
|
[MessagePackObject]
|
||||||
|
public class CardCreateResponse
|
||||||
|
{
|
||||||
|
[JsonPropertyName("reward_list")]
|
||||||
|
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||||
|
[Key("reward_list")]
|
||||||
|
public List<RewardListEntry> RewardList { get; set; } = new();
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user