package com.sy.coinage.workshop.req;

import com.sy.coinage.core.interceptor.Create;
import com.sy.coinage.core.interceptor.Update;

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

import org.hibernate.validator.constraints.Length;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;

import com.alibaba.fastjson2.annotation.JSONField;
import org.hibernate.validator.constraints.Range;
import lombok.Data;

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

    private static final long serialVersionUID = 1L;
    /**
     * -主键 ID -10
     */
    @NotNull(message = "主键 ID不能为空", groups = {Update.class})
    @Range(min = 1, groups = {Update.class})
    private Integer id;
    /**
     * -出库单ID,对应outbound表中ID -10
     */
    @ApiModelProperty(value = "出库单ID,对应outbound表中ID", required = true)
    @NotNull(message = "出库单ID,对应outbound表中ID不能为空")
    private Integer outId;
    /**
     * -EPC码，唯一 -12
     */
    @ApiModelProperty(value = "EPC码，唯一", required = true)
    @NotBlank(message = "EPC码，唯一不能为空")
    @Length(max = 12, message = "EPC码，唯一长度12不正确")
    private String rfid;
    /**
     * -产品编号 -20
     */
    @ApiModelProperty(value = "产品编号", required = true)
    @NotBlank(message = "产品编号不能为空")
    @Length(max = 20, message = "产品编号长度20不正确")
    private String serialNumber;
    /**
     * -皮重（kg） -10
     */
    @ApiModelProperty(value = "皮重（kg）", required = true)
    @NotNull(message = "皮重（kg）不能为空")
    private Double tareWeight;
    /**
     * -毛重（kg） -10
     */
    @ApiModelProperty(value = "毛重（kg）", required = true)
    @NotNull(message = "毛重（kg）不能为空")
    private Double grossWeight;
    /**
     * -净重（kg） -10
     */
    @ApiModelProperty(value = "净重（kg）", required = true)
    @NotNull(message = "净重（kg）不能为空")
    private Double netWeight;
    /**
     * -将rfid对应的冠字号范围，拼装成字符串，保存在此字端，用于页面展示 -100
     */
    @ApiModelProperty(value = "将rfid对应的冠字号范围，拼装成字符串，保存在此字端，用于页面展示", required = true)
    @NotBlank(message = "将rfid对应的冠字号范围，拼装成字符串，保存在此字端，用于页面展示不能为空")
    @Length(max = 100, message = "将rfid对应的冠字号范围，拼装成字符串，保存在此字端，用于页面展示长度100不正确")
    private String crownBetweenStr;
    /**
     * -冠字号范围：@开头的表示冠字号段 #开头的表示各个单独的冠字号（eg:@003-4970,003-5000;）(eg:#003-0005,003-0007) -100
     */
    @ApiModelProperty(value = "冠字号范围：@开头的表示冠字号段 #开头的表示各个单独的冠字号（eg:@003-4970,003-5000;）(eg:#003-0005,003-0007)",
                    required = true)
    @NotBlank(message = "冠字号范围：@开头的表示冠字号段 #开头的表示各个单独的冠字号（eg:@003-4970,003-5000;）(eg:#003-0005,003-0007)不能为空")
    @Length(max = 100,
                    message = "冠字号范围：@开头的表示冠字号段 #开头的表示各个单独的冠字号（eg:@003-4970,003-5000;）(eg:#003-0005,003-0007)长度100不正确")
    private String crownBetween;
    /**
     * -备注 -100
     */
    @ApiModelProperty(value = "备注", required = true)
    @NotBlank(message = "备注不能为空")
    @Length(max = 100, message = "备注长度100不正确")
    private String remark;
    /**
     * -临时库，主库一，主库二 -10
     */
    @ApiModelProperty(value = "临时库，主库一，主库二", required = true)
    @NotNull(message = "临时库，主库一，主库二不能为空")
    private Integer wareId;
    /**
     * -仓库名称（实际存储） -20
     */
    @ApiModelProperty(value = "仓库名称（实际存储）", required = true)
    @NotBlank(message = "仓库名称（实际存储）不能为空")
    @Length(max = 20, message = "仓库名称（实际存储）长度20不正确")
    private String wareCn;
    /**
     * -库位ID -10
     */
    @ApiModelProperty(value = "库位ID ", required = true)
    @NotNull(message = "库位ID 不能为空")
    private Integer areaId;
    /**
     * -仓库库位（实际存储）名称 -20
     */
    @ApiModelProperty(value = "仓库库位（实际存储）名称 ", required = true)
    @NotBlank(message = "仓库库位（实际存储）名称 不能为空")
    @Length(max = 20, message = "仓库库位（实际存储）名称 长度20不正确")
    private String areaCn;
    /**
     * -称重人ID -10
     */
    @ApiModelProperty(value = "称重人ID", required = true)
    @NotNull(message = "称重人ID不能为空")
    private Integer weightorId;
    /**
     * -称重人 -20
     */
    @ApiModelProperty(value = "称重人", required = true)
    @NotBlank(message = "称重人不能为空")
    @Length(max = 20, message = "称重人长度20不正确")
    private String weightor;
    /**
     * -当解缴单：车间出库日期；当返检单：主库出库时间 -19
     */
    @ApiModelProperty(value = "当解缴单：车间出库日期；当返检单：主库出库时间", required = true)
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @NotNull(message = "当解缴单：车间出库日期；当返检单：主库出库时间不能为空")
    private Date outTime;
    /**
     * -in_time -19
     */
    @ApiModelProperty(value = "in_time", required = true)
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @NotNull(message = "in_time不能为空")
    private Date inTime;

}
