using System.Text.Json.Serialization;

namespace Prospect.Server.Api.Models.Client.Data;

// PlayFab StoreItem: a single catalog item offered for sale in a store, with its prices.
public class FStoreItem
{
    /// <summary>
    ///     [optional] Store specific custom data. The data only exists as part of this store; it is not transferred to item instances.
    /// </summary>
    [JsonPropertyName("CustomData")]
    [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
    public object? CustomData { get; set; }

    /// <summary>
    ///     [optional] Intended display position for this item. Note that 0 is the first position and -1 is the last position.
    /// </summary>
    [JsonPropertyName("DisplayPosition")]
    [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
    public uint? DisplayPosition { get; set; }

    /// <summary>
    ///     Unique identifier of the item as it exists in the catalog - note that this must exactly match the ItemId from the catalog.
    /// </summary>
    [JsonPropertyName("ItemId")]
    public string ItemId { get; set; } = "";

    /// <summary>
    ///     [optional] Override prices for this item for specific currencies.
    /// </summary>
    [JsonPropertyName("RealCurrencyPrices")]
    public Dictionary<string, uint> RealCurrencyPrices { get; set; } = new();

    /// <summary>
    ///     [optional] Override prices for this item in virtual currencies and "RM" (the base Real Money purchase price, in USD pennies).
    /// </summary>
    [JsonPropertyName("VirtualCurrencyPrices")]
    public Dictionary<string, uint> VirtualCurrencyPrices { get; set; } = new();
}
