namespace QYZH.InteractiveMagazine.Models.Dto.Mall;

/// <summary>
/// 小程序商品展示输出
/// </summary>
public class WxProductOutput
{
    public long Id { get; set; }
    public string Name { get; set; } = string.Empty;
    public string? Description { get; set; }
    public string? ImageUrl { get; set; }
    public int Price { get; set; }
    public string Type { get; set; } = string.Empty;

    /// <summary>
    /// 是否是虚拟商品
    /// </summary>
    public bool IsVirtual { get; set; }

    /// <summary>
    /// Type对应的Id
    /// </summary>
    public long TypeId { get; set; }

    /// <summary>
    /// 皮肤信息（仅 PetBg 类型有值）
    /// </summary>
    public PetSkinBrief? Skin { get; set; }

    /// <summary>
    /// 用户是否已拥有（PetBg 类型时判断背包中是否有）
    /// </summary>
    public bool Owned { get; set; }
}

/// <summary>
/// 皮肤简要信息
/// </summary>
public class PetSkinBrief
{
    public long SkinId { get; set; }
    public string SkinName { get; set; } = string.Empty;
    public string? Description { get; set; }
    public string Rarity { get; set; } = string.Empty;

    /// <summary>
    /// 皮肤预览图（取当前进化阶段第一张图片）
    /// </summary>
    public string? PreviewImage { get; set; }
}

/// <summary>
/// 兑换输入
/// </summary>
public class ExchangeInput
{
    /// <summary>
    /// 商品Id
    /// </summary>
    public long ProductId { get; set; }

    /// <summary>
    /// 兑换数量（默认1）
    /// </summary>
    public int Quantity { get; set; } = 1;
}

/// <summary>
/// 兑换输出
/// </summary>
public class ExchangeOutput
{
    public long RecordId { get; set; }
    public string ProductName { get; set; } = string.Empty;
    public int PointsCost { get; set; }
    public int PointsBalance { get; set; }
    public string Message { get; set; } = string.Empty;
}

/// <summary>
/// 兑换记录输出
/// </summary>
public class ExchangeRecordOutput
{
    public long Id { get; set; }
    public long ProductId { get; set; }
    public string ProductName { get; set; } = string.Empty;
    public string ProductType { get; set; } = string.Empty;
    public int PointsCost { get; set; }
    public int PointsBalance { get; set; }
    public int Quantity { get; set; }
    public string Status { get; set; } = string.Empty;
    public DateTime CreatedAt { get; set; }
}
