using System.Text.Json.Serialization; using RadicadeServer.RecNet.Enums.Store; namespace RadicadeServer.RecNet.Avatar { public class PurchasableItem { public enum PurchasableItemType { GiftDrop = 0, SeasonTier = 1, SeasonEliteUpgrade = 2 } public int PurchasableItemId { get; set; } public PurchasableItemType Type { get; set; } = PurchasableItemType.GiftDrop; public List Prices { get; set; } = new(); public List SubscriberPrices { get; set; } = new(); public bool IsFeatured { get; set; } public DateTime? EndDate { get; set; } public DateTime? NewUntil { get; set; } } public class PurchasablePrice { public CurrencyType CurrencyType { get; set; } public int Price { get; set; } public int? PurchaseCurrencyId { get; set; } public DateTime? StartDate { get; set; } public DateTime? EndDate { get; set; } } public class PurchasableGiftDrop : PurchasableItem { public List GiftDrops { get; set; } = new(); [JsonPropertyName("GiftDrop")] public Gift? GiftDrop { get => GiftDrops.FirstOrDefault(); set { GiftDrops = value == null ? new List() : new List { value }; } } public PurchasableGiftDrop() {} public PurchasableGiftDrop(List giftDrops) { GiftDrops = giftDrops; } } }