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 DeliveryDetailReq 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 -10
     */
    @ApiModelProperty(value = "发货单ID", required = true)
    @NotNull(message = "发货单ID不能为空")
    private Integer deliveryId;
    /**
     * -rfid -12
     */
    @ApiModelProperty(value = "rfid", required = true)
    @NotBlank(message = "rfid不能为空")
    @Length(max = 12, message = "rfid长度12不正确")
    private String rfid;
    /**
     * -编号 -20
     */
    @ApiModelProperty(value = "编号", required = true)
    @NotBlank(message = "编号不能为空")
    @Length(max = 20, message = "编号长度20不正确")
    private String serialNumber;
    /**
     * -冠字号范围，字符串表示,用于页面显示。 -100
     */
    @ApiModelProperty(value = "冠字号范围，字符串表示,用于页面显示。", required = true)
    @NotBlank(message = "冠字号范围，字符串表示,用于页面显示。不能为空")
    @Length(max = 100, message = "冠字号范围，字符串表示,用于页面显示。长度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;
    /**
     * -皮重 -10
     */
    @ApiModelProperty(value = "皮重", required = true)
    @NotNull(message = "皮重不能为空")
    private Double tareWeight;
    /**
     * -毛重 -10
     */
    @ApiModelProperty(value = "毛重", required = true)
    @NotNull(message = "毛重不能为空")
    private Double grossWeight;
    /**
     * -称重人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 printTime;
    /**
     * -发货时间 -19
     */
    @ApiModelProperty(value = "发货时间", required = true)
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @NotNull(message = "发货时间不能为空")
    private Date deliveryTime;
    /**
     * -删除标记 1:未删除 2:已删除 -10
     */
    @ApiModelProperty(value = "删除标记 1:未删除 2:已删除", required = true)
    @NotNull(message = "删除标记 1:未删除 2:已删除不能为空")
    private Integer delFlag;
    /**
     * -登记类型： 1: 扫描登记 2: 手动登记 -10
     */
    @ApiModelProperty(value = "登记类型： 1: 扫描登记  2: 手动登记", required = true)
    @NotNull(message = "登记类型： 1: 扫描登记  2: 手动登记不能为空")
    private Integer regFlag;
    /**
     * -冗余字端：是否整拍 1:是整拍 2:是拆拍 -10
     */
    @ApiModelProperty(value = "冗余字端：是否整拍 1:是整拍 2:是拆拍", required = true)
    @NotNull(message = "冗余字端：是否整拍 1:是整拍 2:是拆拍不能为空")
    private Integer isWhole;
    /**
     * -冗余字端：拆拍拍子上箱子的数量 -10
     */
    @ApiModelProperty(value = "冗余字端：拆拍拍子上箱子的数量", required = true)
    @NotNull(message = "冗余字端：拆拍拍子上箱子的数量不能为空")
    private Integer qty;

}
