using SVSim.Database.Common;
namespace SVSim.Database.Models;
///
/// One row of the /item_purchase/info catalog — an exchange the user can perform N times per
/// period (monthly or lifetime) by spending RequireItem* to acquire PurchaseItem*.
/// PK = wire purchase_id.
///
/// Both sides reference . Captures show the common shape is
/// currency-for-item (RedEther 5000 → Seer's Globe ×1) or item-for-item (Orb Shard ×5 →
/// Seer's Globe ×1). Per-viewer remaining quota lives in
/// keyed by "item_purchase:{Id}".
///
///
public class ItemPurchaseCatalogEntry : BaseEntity
{
public int RequireItemType { get; set; }
public long RequireItemId { get; set; }
public int RequireItemNum { get; set; }
public int PurchaseItemType { get; set; }
public long PurchaseItemId { get; set; }
public int PurchaseItemNum { get; set; }
///
/// SystemText-ready display name. May be empty — the client falls back to a templated name
/// built from UserGoods.getUserGoodsName + count via SystemText key "Shop_0132".
///
public string PurchaseName { get; set; } = string.Empty;
/// True → quota resets at the start of each JST month. False → lifetime quota.
public bool IsMonthlyReset { get; set; }
/// Per-period purchase cap. Wire rest = max(0, PurchaseLimit - counter).
public int PurchaseLimit { get; set; }
public bool IsEnabled { get; set; }
}