diff --git a/unity-client/Assets/Scripts/Models/DeckGenResponse.cs b/unity-client/Assets/Scripts/Models/DeckGenResponse.cs new file mode 100644 index 0000000..ecafe18 --- /dev/null +++ b/unity-client/Assets/Scripts/Models/DeckGenResponse.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using Newtonsoft.Json; + +namespace CommanderAILab.Models +{ + /// Maps to GeneratedDeckCard from /api/deckgen/v3. + [Serializable] + public class GeneratedDeckCard + { + [JsonProperty("scryfall_id")] public string scryfallId; + [JsonProperty("name")] public string name; + [JsonProperty("type_line")] public string typeLine; + [JsonProperty("mana_cost")] public string manaCost; + [JsonProperty("cmc")] public float cmc; + [JsonProperty("card_type")] public string cardType; + [JsonProperty("roles")] public List roles; + [JsonProperty("source")] public string source; + [JsonProperty("quantity")] public int quantity; + [JsonProperty("image_url")] public string imageUrl; + [JsonProperty("owned_qty")] public int ownedQty; + [JsonProperty("is_proxy")] public bool isProxy; + + public override string ToString() => $"{name} ({manaCost})"; + } + + /// Response wrapper for /api/deckgen/v3. + [Serializable] + public class DeckGenResponse + { + [JsonProperty("cards")] public List cards; + [JsonProperty("commander")] public string commander; + [JsonProperty("strategy")] public string strategy; + + public override string ToString() => $"Generated deck: {commander} ({cards?.Count ?? 0} cards)"; + } +}