namespace QYZH.InteractiveMagazine.Models.Dto.Bag;

/// <summary>
/// 背包物品输出
/// </summary>
public class UserBagOutput
{
    public long Id { get; set; }
    public long ItemId { get; set; }
    public string ItemType { get; set; } = string.Empty;
    public int Quantity { get; set; }
    public string Status { get; set; } = string.Empty;

    /// <summary>
    /// 关联商品信息（如果有）
    /// </summary>
    public BagProductBrief? Product { get; set; }

    /// <summary>
    /// 关联皮肤信息（PetBg 类型时）
    /// </summary>
    public BagSkinBrief? Skin { get; set; }

    public DateTime CreatedAt { get; set; }
}

/// <summary>
/// 背包中的商品简要
/// </summary>
public class BagProductBrief
{
    public string Name { get; set; } = string.Empty;
    public string? ImageUrl { get; set; }
    public string? Description { get; set; }
}

/// <summary>
/// 背包中的皮肤简要
/// </summary>
public class BagSkinBrief
{
    public long SkinId { get; set; }
    public string SkinName { get; set; } = string.Empty;
    public string Rarity { get; set; } = string.Empty;

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

/// <summary>
/// 使用物品输入（补签卡）
/// </summary>
public class UseItemInput
{
    /// <summary>
    /// 背包物品Id
    /// </summary>
    public long BagItemId { get; set; }

    /// <summary>
    /// 补签目标日期（yyyy-MM-dd，仅补签卡使用）
    /// </summary>
    public string? TargetDate { get; set; }
}

/// <summary>
/// 换肤输入
/// </summary>
public class EquipSkinInput
{
    /// <summary>
    /// 皮肤Id（传0则恢复默认皮肤）
    /// </summary>
    public long SkinId { get; set; }
}

/// <summary>
/// 使用物品输出
/// </summary>
public class UseItemOutput
{
    public bool IsSuccess { get; set; }
    public string Message { get; set; } = string.Empty;

    /// <summary>
    /// 补签时返回的签到结果
    /// </summary>
    public object? Extra { get; set; }
}
