namespace HoneyBox.Admin.Business.Models.QyLevel;

using HoneyBox.Admin.Business.Models.Reward;

#region Response Models

/// <summary>
/// 权益等级响应模型
/// </summary>
public class QyLevelResponse
{
    /// <summary>
    /// 主键ID
    /// </summary>
    public int Id { get; set; }

    /// <summary>
    /// 等级
    /// </summary>
    public int Level { get; set; }

    /// <summary>
    /// 等级名称
    /// </summary>
    public string Title { get; set; } = string.Empty;

    /// <summary>
    /// 所需欧气值
    /// </summary>
    public int RequiredPoints { get; set; }

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

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

/// <summary>
/// 权益等级奖品响应模型
/// </summary>
public class QyLevelPrizeResponse
{
    /// <summary>
    /// 主键ID
    /// </summary>
    public int Id { get; set; }

    /// <summary>
    /// 权益等级ID
    /// </summary>
    public int QyLevelId { get; set; }

    /// <summary>
    /// 权益等级
    /// </summary>
    public int QyLevel { get; set; }

    /// <summary>
    /// 奖品类型：1-优惠券 2-实物奖品
    /// </summary>
    public int Type { get; set; }

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

    /// <summary>
    /// 奖品标题
    /// </summary>
    public string? Title { get; set; }

    /// <summary>
    /// 优惠券ID
    /// </summary>
    public int? CouponId { get; set; }

    /// <summary>
    /// 优惠券数量
    /// </summary>
    public int? Quantity { get; set; }

    /// <summary>
    /// 奖品价值
    /// </summary>
    public decimal? Value { get; set; }

    /// <summary>
    /// 兑换价格
    /// </summary>
    public decimal? ExchangePrice { get; set; }

    /// <summary>
    /// 市场参考价
    /// </summary>
    public decimal? ReferencePrice { get; set; }

    /// <summary>
    /// 中奖概率（0-100）
    /// </summary>
    public decimal? Probability { get; set; }

    /// <summary>
    /// 奖品图片URL
    /// </summary>
    public string? Image { get; set; }

    /// <summary>
    /// 奖品编码
    /// </summary>
    public string? PrizeCode { get; set; }

    /// <summary>
    /// 排序
    /// </summary>
    public int? Sort { 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 QyLevelListRequest : PagedRequest
{
    /// <summary>
    /// 关键词搜索（搜索名称）
    /// </summary>
    public string? Keyword { get; set; }
}

/// <summary>
/// 权益等级更新请求
/// </summary>
public class QyLevelUpdateRequest
{
    /// <summary>
    /// 等级
    /// </summary>
    public int Level { get; set; }

    /// <summary>
    /// 等级名称
    /// </summary>
    public string Title { get; set; } = string.Empty;

    /// <summary>
    /// 所需欧气值
    /// </summary>
    public int RequiredPoints { get; set; }
}

/// <summary>
/// 权益等级创建请求
/// </summary>
public class QyLevelCreateRequest
{
    /// <summary>
    /// 等级
    /// </summary>
    public int Level { get; set; }

    /// <summary>
    /// 等级名称
    /// </summary>
    public string Title { get; set; } = string.Empty;

    /// <summary>
    /// 所需欧气值
    /// </summary>
    public int RequiredPoints { get; set; }
}

/// <summary>
/// 权益等级奖品列表查询请求
/// </summary>
public class QyLevelPrizeListRequest : PagedRequest
{
    /// <summary>
    /// 奖品类型筛选：1-优惠券 2-实物奖品
    /// </summary>
    public int? Type { get; set; }

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

/// <summary>
/// 权益等级奖品创建请求
/// </summary>
public class QyLevelPrizeCreateRequest
{
    /// <summary>
    /// 奖品类型：1-优惠券 2-实物奖品
    /// </summary>
    public int Type { get; set; }

    /// <summary>
    /// 奖品标题（实物奖品必填）
    /// </summary>
    public string? Title { get; set; }

    /// <summary>
    /// 优惠券ID（优惠券类型必填）
    /// </summary>
    public int? CouponId { get; set; }

    /// <summary>
    /// 优惠券数量（优惠券类型必填）
    /// </summary>
    public int? Quantity { get; set; }

    /// <summary>
    /// 奖品价值（实物奖品必填）
    /// </summary>
    public decimal? Value { get; set; }

    /// <summary>
    /// 兑换价格（实物奖品必填）
    /// </summary>
    public decimal? ExchangePrice { get; set; }

    /// <summary>
    /// 市场参考价（实物奖品必填）
    /// </summary>
    public decimal? ReferencePrice { get; set; }

    /// <summary>
    /// 中奖概率（0-100，最多2位小数）
    /// </summary>
    public decimal? Probability { get; set; }

    /// <summary>
    /// 奖品图片URL（实物奖品必填）
    /// </summary>
    public string? Image { get; set; }

    /// <summary>
    /// 奖品等级ID
    /// </summary>
    public int? ShangId { get; set; }

    /// <summary>
    /// 排序
    /// </summary>
    public int? Sort { get; set; }
}

/// <summary>
/// 权益等级奖品更新请求
/// </summary>
public class QyLevelPrizeUpdateRequest
{
    /// <summary>
    /// 奖品类型：1-优惠券 2-实物奖品
    /// </summary>
    public int Type { get; set; }

    /// <summary>
    /// 奖品标题（实物奖品必填）
    /// </summary>
    public string? Title { get; set; }

    /// <summary>
    /// 优惠券ID（优惠券类型必填）
    /// </summary>
    public int? CouponId { get; set; }

    /// <summary>
    /// 优惠券数量（优惠券类型必填）
    /// </summary>
    public int? Quantity { get; set; }

    /// <summary>
    /// 奖品价值（实物奖品必填）
    /// </summary>
    public decimal? Value { get; set; }

    /// <summary>
    /// 兑换价格（实物奖品必填）
    /// </summary>
    public decimal? ExchangePrice { get; set; }

    /// <summary>
    /// 市场参考价（实物奖品必填）
    /// </summary>
    public decimal? ReferencePrice { get; set; }

    /// <summary>
    /// 中奖概率（0-100，最多2位小数）
    /// </summary>
    public decimal? Probability { get; set; }

    /// <summary>
    /// 奖品图片URL（实物奖品必填）
    /// </summary>
    public string? Image { get; set; }

    /// <summary>
    /// 奖品等级ID
    /// </summary>
    public int? ShangId { get; set; }

    /// <summary>
    /// 排序
    /// </summary>
    public int? Sort { get; set; }
}

#endregion
