move models to shared, make new admin project

This commit is contained in:
Lapis
2026-06-16 18:32:28 -04:00
parent ee98c4c369
commit c20d215ee0
106 changed files with 60428 additions and 5 deletions
@@ -0,0 +1,37 @@
using System.Text.Json.Serialization;
namespace CannedNet.Models;
public class BuyItemRequest
{
[JsonPropertyName("StorefrontType")]
public int StorefrontType { get; set; }
[JsonPropertyName("PurchasableItemId")]
public int PurchasableItemId { get; set; }
[JsonPropertyName("CurrencyType")]
public int CurrencyType { get; set; }
[JsonPropertyName("CouponConsumablePlayerMappingId")]
public int? CouponConsumablePlayerMappingId { get; set; }
[JsonPropertyName("Gift")]
public GiftRequest? Gift { get; set; }
}
public class GiftRequest
{
[JsonPropertyName("ToPlayerId")]
public int ToPlayerId { get; set; }
[JsonPropertyName("Message")]
public string Message { get; set; } = string.Empty;
[JsonPropertyName("Anonymous")]
public bool Anonymous { get; set; }
[JsonPropertyName("GiftContext")]
public int GiftContext { get; set; }
}
@@ -0,0 +1,88 @@
using System.Text.Json.Serialization;
namespace CannedNet.Models;
public class BuyItemResponse
{
[JsonPropertyName("BalanceUpdates")]
public List<BalanceUpdate> BalanceUpdates { get; set; } = new();
[JsonPropertyName("Balance")]
public int Balance { get; set; }
[JsonPropertyName("CurrencyType")]
public int CurrencyType { get; set; }
[JsonPropertyName("BalanceType")]
public int BalanceType { get; set; }
[JsonPropertyName("Platform")]
public int Platform { get; set; }
}
public class BalanceUpdate
{
[JsonPropertyName("UpdateResponse")]
public int UpdateResponse { get; set; }
[JsonPropertyName("Data")]
public List<GiftData> Data { get; set; } = new();
}
public class GiftData
{
[JsonPropertyName("Id")]
public int Id { get; set; }
[JsonPropertyName("FromPlayerId")]
public int? FromPlayerId { get; set; }
[JsonPropertyName("ConsumableItemDesc")]
public string ConsumableItemDesc { get; set; } = string.Empty;
[JsonPropertyName("AvatarItemDesc")]
public string AvatarItemDesc { get; set; } = string.Empty;
[JsonPropertyName("AvatarItemType")]
public int AvatarItemType { get; set; }
[JsonPropertyName("FriendlyName")]
public string FriendlyName { get; set; } = string.Empty;
[JsonPropertyName("EquipmentPrefabName")]
public string EquipmentPrefabName { get; set; } = string.Empty;
[JsonPropertyName("EquipmentModificationGuid")]
public string EquipmentModificationGuid { get; set; } = string.Empty;
[JsonPropertyName("CurrencyType")]
public int CurrencyType { get; set; }
[JsonPropertyName("Currency")]
public int Currency { get; set; }
[JsonPropertyName("Xp")]
public int Xp { get; set; }
[JsonPropertyName("Level")]
public int Level { get; set; }
[JsonPropertyName("Platform")]
public int Platform { get; set; }
[JsonPropertyName("PlatformsToSpawnOn")]
public int PlatformsToSpawnOn { get; set; }
[JsonPropertyName("BalanceType")]
public int BalanceType { get; set; }
[JsonPropertyName("GiftContext")]
public int GiftContext { get; set; }
[JsonPropertyName("GiftRarity")]
public int GiftRarity { get; set; }
[JsonPropertyName("Message")]
public string Message { get; set; } = string.Empty;
}
@@ -0,0 +1,35 @@
using System.Text.Json.Serialization;
namespace CannedNet.Models;
public class ConsumableItem
{
public int Id { get; set; }
public int OwnerAccountId { get; set; }
[JsonPropertyName("Ids")]
public List<int> Ids { get; set; } = new();
[JsonPropertyName("CreatedAts")]
public List<DateTime> CreatedAts { get; set; } = new();
[JsonPropertyName("ConsumableItemDesc")]
public string ConsumableItemDesc { get; set; } = string.Empty;
[JsonPropertyName("Count")]
public int Count { get; set; }
[JsonPropertyName("InitialCount")]
public int InitialCount { get; set; }
[JsonPropertyName("IsActive")]
public bool IsActive { get; set; }
[JsonPropertyName("ActiveDurationMinutes")]
public int ActiveDurationMinutes { get; set; }
[JsonPropertyName("IsTransferable")]
public bool IsTransferable { get; set; }
}
@@ -0,0 +1,13 @@
namespace CannedNet.Models;
public enum ConsumableType
{
Invalid = -1,
CameraFilter,
Potion_Head = 2,
Potion_Hand,
Food,
KO_Customization,
Potion_HairDye,
Coupon
}
@@ -0,0 +1,27 @@
using System.Text.Json.Serialization;
namespace CannedNet.Models;
public class EarnableReward
{
public int Id { get; set; }
[JsonPropertyName("friendlyName")]
public string FriendlyName { get; set; } = string.Empty;
[JsonPropertyName("rewardContext")]
public int RewardContext { get; set; }
[JsonPropertyName("consumableItemDesc")]
public string ConsumableItemDesc { get; set; } = string.Empty;
[JsonPropertyName("avatarItemDesc")]
public string AvatarItemDesc { get; set; } = string.Empty;
[JsonPropertyName("avatarItemType")]
public int AvatarItemType { get; set; }
[JsonPropertyName("giftRarity")]
public int GiftRarity { get; set; }
}
@@ -0,0 +1,12 @@
namespace CannedNet.Models;
public class Storefront
{
public int Id { get; set; }
public string Name { get; set; } = string.Empty;
public int StorefrontType { get; set; }
public DateTime NextUpdate { get; set; }
public virtual ICollection<StorefrontItem> Items { get; set; } = new List<StorefrontItem>();
}
@@ -0,0 +1,16 @@
namespace CannedNet.Models;
public class StorefrontItem
{
public int Id { get; set; }
public int StorefrontId { get; set; }
public int PurchasableItemId { get; set; }
public int Type { get; set; }
public bool IsFeatured { get; set; }
public DateTime? NewUntil { get; set; }
public virtual Storefront Storefront { get; set; } = null!;
public virtual ICollection<GiftDrop> GiftDrops { get; set; } = new List<GiftDrop>();
public virtual ICollection<StorefrontPrice> Prices { get; set; } = new List<StorefrontPrice>();
}
@@ -0,0 +1,12 @@
namespace CannedNet.Models;
public class StorefrontPrice
{
public int Id { get; set; }
public int StorefrontItemId { get; set; }
public int CurrencyType { get; set; }
public int Price { get; set; }
public virtual StorefrontItem StorefrontItem { get; set; } = null!;
}