namespace HoneyBox.Admin.Business.Models.Reward;

#region Response Models

/// <summary>
/// 优惠券信息（用于奖励关联）
/// </summary>
public class CouponInfo
{
    /// <summary>
    /// 优惠券ID
    /// </summary>
    public int Id { get; set; }

    /// <summary>
    /// 优惠券标题
    /// </summary>
    public string Title { get; set; } = string.Empty;

    /// <summary>
    /// 优惠金额
    /// </summary>
    public decimal? Price { get; set; }

    /// <summary>
    /// 满减门槛金额
    /// </summary>
    public decimal? ManPrice { get; set; }

    /// <summary>
    /// 有效天数
    /// </summary>
    public int? EffectiveDay { get; set; }
}

/// <summary>
/// 奖励响应模型
/// </summary>
public class RewardResponse
{
    /// <summary>
    /// 主键ID
    /// </summary>
    public int Id { get; set; }

    /// <summary>
    /// 奖励ID（业务标识）
    /// </summary>
    public string RewardId { get; set; } = string.Empty;

    /// <summary>
    /// 奖励类型：1-钻石 2-UU币 3-达达卷 4-优惠券
    /// </summary>
    public int RewardType { get; set; }

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

    /// <summary>
    /// 奖励扩展参数（如优惠券ID）
    /// </summary>
    public int? RewardExtend { get; set; }

    /// <summary>
    /// 奖励数值
    /// </summary>
    public decimal RewardValue { get; set; }

    /// <summary>
    /// 描述
    /// </summary>
    public string? Description { get; set; }

    /// <summary>
    /// 创建时间
    /// </summary>
    public DateTime? CreatedAt { get; set; }

    /// <summary>
    /// 更新时间
    /// </summary>
    public DateTime? UpdatedAt { get; set; }

    /// <summary>
    /// 关联的优惠券信息（当类型为优惠券时）
    /// </summary>
    public CouponInfo? Coupon { get; set; }
}

#endregion

#region Request Models

/// <summary>
/// 奖励列表查询请求
/// </summary>
public class RewardListRequest : PagedRequest
{
    /// <summary>
    /// 奖励类型筛选：1-钻石 2-UU币 3-达达卷 4-优惠券
    /// </summary>
    public int? RewardType { get; set; }

    /// <summary>
    /// 关键词搜索（搜索描述）
    /// </summary>
    public string? Keyword { get; set; }

    /// <summary>
    /// 奖励ID筛选（业务标识）
    /// </summary>
    public string? RewardId { get; set; }
}

/// <summary>
/// 奖励创建请求
/// </summary>
public class RewardCreateRequest
{
    /// <summary>
    /// 奖励ID（业务标识，可选，不传则自动生成）
    /// </summary>
    public string? RewardId { get; set; }

    /// <summary>
    /// 奖励类型：1-钻石 2-UU币 3-达达卷 4-优惠券
    /// </summary>
    public int RewardType { get; set; }

    /// <summary>
    /// 奖励扩展参数（优惠券ID，当类型为优惠券时必填）
    /// </summary>
    public int? RewardExtend { get; set; }

    /// <summary>
    /// 奖励数值（非优惠券类型时必填）
    /// </summary>
    public decimal RewardValue { get; set; }

    /// <summary>
    /// 描述
    /// </summary>
    public string? Description { get; set; }
}

/// <summary>
/// 奖励更新请求
/// </summary>
public class RewardUpdateRequest
{
    /// <summary>
    /// 奖励类型：1-钻石 2-UU币 3-达达卷 4-优惠券
    /// </summary>
    public int RewardType { get; set; }

    /// <summary>
    /// 奖励扩展参数（优惠券ID，当类型为优惠券时必填）
    /// </summary>
    public int? RewardExtend { get; set; }

    /// <summary>
    /// 奖励数值（非优惠券类型时必填）
    /// </summary>
    public decimal RewardValue { get; set; }

    /// <summary>
    /// 描述
    /// </summary>
    public string? Description { get; set; }
}

/// <summary>
/// 奖励项（用于批量操作）
/// </summary>
public class RewardItem
{
    /// <summary>
    /// 奖励类型：1-钻石 2-UU币 3-达达卷 4-优惠券
    /// </summary>
    public int RewardType { get; set; }

    /// <summary>
    /// 奖励扩展参数（优惠券ID）
    /// </summary>
    public int? RewardExtend { get; set; }

    /// <summary>
    /// 奖励数值
    /// </summary>
    public decimal RewardValue { get; set; }

    /// <summary>
    /// 描述
    /// </summary>
    public string? Description { get; set; }
}

/// <summary>
/// 批量更新奖励请求
/// </summary>
public class RewardBatchRequest
{
    /// <summary>
    /// 奖励ID（业务标识）
    /// </summary>
    public string RewardId { get; set; } = string.Empty;

    /// <summary>
    /// 奖励ID前缀（用于生成新的奖励ID）
    /// </summary>
    public string? RewardIdPrefix { get; set; }

    /// <summary>
    /// 奖励列表
    /// </summary>
    public List<RewardItem> Rewards { get; set; } = new();
}

/// <summary>
/// 根据RewardId查询请求
/// </summary>
public class RewardByRewardIdRequest
{
    /// <summary>
    /// 奖励ID（业务标识）
    /// </summary>
    public string RewardId { get; set; } = string.Empty;
}

#endregion
