mirror of
https://github.com/JogmansonReal/Radicade.git
synced 2026-10-26 23:49:02 -07:00
Radicade Public Code
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user