package com.sy.coinage.workshop.req;


import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.NotBlank;

import com.sy.coinage.app.req.vo.CheckDetailVO;
import org.hibernate.validator.constraints.Length;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.List;

import lombok.Data;

/**
 * -添加请求bean
 */
@Data
public class CheckReq implements Serializable {

    private static final long serialVersionUID = 1L;

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

    @ApiModelProperty(value = "抽检单号(唯一标识)", required = true)
    @NotBlank(message = "抽检单号(唯一标识)不能为空")
    @Length(max = 20, message = "抽检单号(唯一标识)长度20不正确")
    private String orderNo;

    @ApiModelProperty(value = "抽检箱子总数量", required = true)
    @NotNull(message = "抽检箱子总数量不能为空")
    private Integer qty;

    @ApiModelProperty(value = "总库仓库ID", required = true)
    @NotNull(message = "总库仓库ID不能为空")
    private Integer wareId;

    @ApiModelProperty(value = "目标部门ID", required = true)
    @NotNull(message = "目标部门ID不能为空")
    private Integer targetDeptId;

    @ApiModelProperty(value = "复核人id", required = true)
    @NotNull(message = "复核人id不能为空")
    private Integer checkId;

    @ApiModelProperty(value = "抽检明细集合", required = true)
    @NotEmpty(message = "抽检明细集合不能为空")
    private List<@Valid CheckDetailVO> list;

}
