package co.yixiang.yshop.module.cart.controller.app.cart.param;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * @ClassName 购物车数量CartNumParam
 * @Author hupeng <610796224@qq.com>
 * @Date 2023/6/17
 **/
@Getter
@Setter
@Schema(description = "用户 APP - 购物车数量参数")
public class AppCartNumParam {

    @Min(value = 1,message = "数量不在合法范围内")
    @Max(value = 9999,message = "数量不在合法范围内")
    @Schema(description = "购物车数量", required = true)
    private Integer number;

    @NotNull(message = "参数有误")
    @Schema(description = "购物车ID", required = true)
    private Long id;

}
