package com.sy.coinage.workshop.req;

import com.sy.coinage.core.interceptor.Update;
import com.sy.coinage.workshop.req.vo.BaseInfoVO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

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

@Data
public class WorkshopOutboundAddReq {

    /**
     * 自增主键 -10
     */
    @ApiModelProperty(value = "自增主键，修改必填")
    @NotNull(message = "自增主键不能为空", groups = {Update.class})
    @Range(min = 1, groups = {Update.class})
    private Integer id;

    @ApiModelProperty(value = "品名id")
    @NotNull(message = "品名id不能为空")
    private Integer securitiesId;

    @ApiModelProperty(value = "编号明细集合")
    @NotEmpty(message = "编号明细集合不能为空")
    private List<@Valid BaseInfoVO> detailList;
}
