package com.yami.shop.groupbuy.comment.api.param;

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

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

/**
 * 开团/参团需要的参数
 */
@Data
@ApiModel("拼团下单参数")
public class ApiGroupOrderParam {

    @ApiModelProperty(value = "拼团团队id，（如果用户为参团则需要填写对应的拼团团队Id(groupTeamId)，如果为用户为开团,拼团团队Id(groupTeamId)为0）")
    @NotNull(message = "拼团团队id不能为空")
    private Long groupTeamId;

    @NotNull(message = "活动商品规格Id不能为空")
    @ApiModelProperty(value = "拼团商品规格Id", required = true)
    private Long groupSkuId;

    @NotNull(message = "商品数量不能为空")
    @Min(value = 1, message = "商品数量不能为空")
    @ApiModelProperty(value = "商品数量", required = true)
    private Integer prodCount;

    @ApiModelProperty(value = "地址ID，0为默认地址", required = true)
    @NotNull(message = "地址不能为空")
    private Long addrId;
}
