using System.ComponentModel.DataAnnotations;

namespace HoneyBox.Admin.Business.Models.User;

/// <summary>
/// 赠送优惠券请求
/// </summary>
public class GiftCouponRequest
{
    /// <summary>
    /// 优惠券模板ID
    /// </summary>
    [Required(ErrorMessage = "请选择优惠券")]
    [Range(1, int.MaxValue, ErrorMessage = "优惠券ID无效")]
    public int CouponId { get; set; }

    /// <summary>
    /// 赠送数量
    /// </summary>
    [Required(ErrorMessage = "请输入赠送数量")]
    [Range(1, 100, ErrorMessage = "赠送数量必须在1-100之间")]
    public int Quantity { get; set; } = 1;
}

/// <summary>
/// 赠送卡牌请求
/// </summary>
public class GiftCardRequest
{
    /// <summary>
    /// 商品ID
    /// </summary>
    [Required(ErrorMessage = "请选择商品")]
    [Range(1, int.MaxValue, ErrorMessage = "商品ID无效")]
    public int GoodsId { get; set; }

    /// <summary>
    /// 奖品ID
    /// </summary>
    [Required(ErrorMessage = "请选择奖品")]
    [Range(1, int.MaxValue, ErrorMessage = "奖品ID无效")]
    public int GoodsListId { get; set; }

    /// <summary>
    /// 赠送数量
    /// </summary>
    [Required(ErrorMessage = "请输入赠送数量")]
    [Range(1, 100, ErrorMessage = "赠送数量必须在1-100之间")]
    public int Quantity { get; set; } = 1;
}
