namespace HoneyBox.Model.Models.Redeem;

/// <summary>
/// 使用兑换码请求
/// </summary>
public class UseRedeemCodeRequest
{
    /// <summary>
    /// 兑换码
    /// </summary>
    public string Code { get; set; } = string.Empty;
}

/// <summary>
/// 兑换码结果
/// </summary>
public class RedeemResult
{
    /// <summary>
    /// 是否成功
    /// </summary>
    public bool Success { get; set; }

    /// <summary>
    /// 消息
    /// </summary>
    public string Message { get; set; } = string.Empty;

    /// <summary>
    /// 奖励类型: money=余额, integral=吧唧币, score=积分
    /// </summary>
    public string RewardType { get; set; } = string.Empty;

    /// <summary>
    /// 奖励数量
    /// </summary>
    public decimal RewardAmount { get; set; }
}

/// <summary>
/// 兑换记录项
/// </summary>
public class RedeemRecordItem
{
    /// <summary>
    /// 记录ID
    /// </summary>
    public int Id { get; set; }

    /// <summary>
    /// 兑换码（部分隐藏）
    /// </summary>
    public string Code { get; set; } = string.Empty;

    /// <summary>
    /// 奖励类型: money=余额, integral=吧唧币, score=积分
    /// </summary>
    public string RewardType { get; set; } = string.Empty;

    /// <summary>
    /// 奖励类型名称
    /// </summary>
    public string RewardTypeName { get; set; } = string.Empty;

    /// <summary>
    /// 奖励数量
    /// </summary>
    public decimal RewardAmount { get; set; }

    /// <summary>
    /// 使用时间
    /// </summary>
    public DateTime? UsedAt { get; set; }

    /// <summary>
    /// 备注
    /// </summary>
    public string? Remark { get; set; }
}

/// <summary>
/// 兑换记录响应
/// </summary>
public class RedeemRecordResponse
{
    /// <summary>
    /// 记录列表
    /// </summary>
    public List<RedeemRecordItem> List { get; set; } = new();

    /// <summary>
    /// 总数
    /// </summary>
    public int Total { get; set; }

    /// <summary>
    /// 当前页
    /// </summary>
    public int Page { get; set; }

    /// <summary>
    /// 每页数量
    /// </summary>
    public int PageSize { get; set; }
}
