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

import com.fasterxml.jackson.annotation.JsonProperty;
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 添加购物车CartParam
 * @Author hupeng <610796224@qq.com>
 * @Date 2023/6/16
 **/
@Getter
@Setter
@Schema(description = "用户 APP - 添加购物车参数")
public class AppCartParam {

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

    @JsonProperty(value = "new")
    @Schema(description = "是否立即购买1-是 0-否表示加入购物车列表", required = true)
    private Integer isNew = 0;

    @NotNull(message = "参数有误")
    @Schema(description = "产品ID", required = true)
    private Long productId;

    @Schema(description = "商品属性sku的unique值", required = true)
    private String uniqueId;

    @Schema(description = "产品拼团ID", required = true)
    private Long combinationId = 0L;

    @Schema(description = "产品秒杀ID", required = true)
    private Long secKillId = 0L;

    @Schema(description = "产品砍价ID", required = true)
    private Long bargainId = 0L;
}
