Files
2026-10-16 23:33:13 -07:00

62 lines
1.3 KiB
C#

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<PurchasablePrice> Prices { get; set; } = new();
public List<PurchasablePrice> 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<Gift> GiftDrops { get; set; } = new();
[JsonPropertyName("GiftDrop")]
public Gift? GiftDrop
{
get => GiftDrops.FirstOrDefault();
set
{
GiftDrops = value == null ? new List<Gift>() : new List<Gift> { value };
}
}
public PurchasableGiftDrop() {}
public PurchasableGiftDrop(List<Gift> giftDrops) {
GiftDrops = giftDrops;
}
}
}