using MessagePack; using SVSim.Database.Models; namespace SVSim.EmulatedEntrypoint.Models.Dtos; /// /// A card in a user's collection and the number possessed. /// [MessagePackObject] public class UserCard : CardIdentifier { /// /// The number of the specified card the user has. /// [Key("number")] public int Count { get; set; } /// /// Whether the card is protected from dusting. /// [Key("is_protected")] public int IsProtected { get; set; } public UserCard(OwnedCardEntry card) { this.CardId = card.Card.Id; this.Count = card.Count; this.IsProtected = card.IsProtected ? 1 : 0; } public UserCard() { } }