package com.fs.hisStore.param;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 购物车结算前限购校验参数
 */
@Data
public class CartPurchaseLimitCheckParam {
    
    @Data
    public static class ProductItem {
        @NotNull(message = "商品ID不能为空")
        @ApiModelProperty(value = "商品ID", required = true)
        private Long productId;
        
        @NotNull(message = "商品数量不能为空")
        @ApiModelProperty(value = "商品数量", required = true)
        private Integer num;
    }
    
    @NotNull(message = "商品列表不能为空")
    @ApiModelProperty(value = "选中的商品列表", required = true)
    private List<ProductItem> products;
}
