Files
SVSimServer/SVSim.BattleNode/Protocol/Bodies/MatchedBody.cs

37 lines
1.8 KiB
C#

using System.Text.Json.Serialization;
namespace SVSim.BattleNode.Protocol.Bodies;
public sealed record MatchedBody(
[property: JsonPropertyName("selfInfo")] MatchedSelfInfo SelfInfo,
[property: JsonPropertyName("oppoInfo")] MatchedOppoInfo OppoInfo,
[property: JsonPropertyName("selfDeck")] IReadOnlyList<DeckCardRef> SelfDeck,
[property: JsonPropertyName("resultCode")] int ResultCode = 1) : IMsgBody;
public sealed record MatchedSelfInfo(
[property: JsonPropertyName("country_code")] string CountryCode,
[property: JsonPropertyName("userName")] string UserName,
[property: JsonPropertyName("sleeveId")] string SleeveId,
[property: JsonPropertyName("emblemId")] string EmblemId,
[property: JsonPropertyName("degreeId")] string DegreeId,
[property: JsonPropertyName("fieldId")] int FieldId,
[property: JsonPropertyName("isOfficial")] int IsOfficial,
[property: JsonPropertyName("oppoId")] long OppoId,
[property: JsonPropertyName("seed")] long Seed);
public sealed record MatchedOppoInfo(
[property: JsonPropertyName("country_code")] string CountryCode,
[property: JsonPropertyName("userName")] string UserName,
[property: JsonPropertyName("sleeveId")] string SleeveId,
[property: JsonPropertyName("emblemId")] string EmblemId,
[property: JsonPropertyName("degreeId")] string DegreeId,
[property: JsonPropertyName("fieldId")] int FieldId,
[property: JsonPropertyName("isOfficial")] int IsOfficial,
[property: JsonPropertyName("oppoId")] long OppoId,
[property: JsonPropertyName("seed")] long Seed,
[property: JsonPropertyName("oppoDeckCount")] int OppoDeckCount);
public sealed record DeckCardRef(
[property: JsonPropertyName("idx")] int Idx,
[property: JsonPropertyName("cardId")] long CardId);