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 LogisticsReq 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;
    /**
     * -编号 -20
     */
    @ApiModelProperty(value = "编号", required = true)
    @NotBlank(message = "编号不能为空")
    @Length(max = 20, message = "编号长度20不正确")
    private String serialNumber;
    /**
     * -标签 -12
     */
    @ApiModelProperty(value = "标签", required = true)
    @NotBlank(message = "标签不能为空")
    @Length(max = 12, message = "标签长度12不正确")
    private String rfid;
    /**
     * -拆包的源头标签（冗余字端，可不填） -12
     */
    @ApiModelProperty(value = "拆包的源头标签（冗余字端，可不填）", required = true)
    @NotBlank(message = "拆包的源头标签（冗余字端，可不填）不能为空")
    @Length(max = 12, message = "拆包的源头标签（冗余字端，可不填）长度12不正确")
    private String rfidSrc;
    /**
     * -冠字号范围(抽检/拆包冠字号),从传入的rfid到基础信息里获取 ) -100
     */
    @ApiModelProperty(value = "冠字号范围(抽检/拆包冠字号),从传入的rfid到基础信息里获取 )", required = true)
    @NotBlank(message = "冠字号范围(抽检/拆包冠字号),从传入的rfid到基础信息里获取 )不能为空")
    @Length(max = 100, message = "冠字号范围(抽检/拆包冠字号),从传入的rfid到基础信息里获取 )长度100不正确")
    private String crownBetween;
    /**
     * -生命周期状态:1初始登记 2:车间入库 3:车间出库 4:总库入库 5:主库抽检出库 6.车间抽检入库确认 7.车间抽检出库8 主库抽检返回确认 9返检总库出库 10:返检车间确认 11拆包
     * 12：已发货 -10
     */
    @ApiModelProperty(
            value = "生命周期状态:1初始登记 2:车间入库 3:车间出库 4:总库入库  5:主库抽检出库 6.车间抽检入库确认 7.车间抽检出库8 主库抽检返回确认 9返检总库出库 10:返检车间确认 11拆包 12：已发货 13:返回机台",
            required = true)
    @NotNull(message = "生命周期状态:1初始登记 2:车间入库 3:车间出库 4:总库入库  5:主库抽检出库 6.车间抽检入库确认 7.车间抽检出库8 主库抽检返回确认 9返检总库出库 10:返检车间确认 11拆包 12：已发货 13:返回机台不能为空")
    private Integer status;
    /**
     * -仓库ID -10
     */
    @ApiModelProperty(value = "仓库ID", required = true)
    @NotNull(message = "仓库ID不能为空")
    private Integer wareId;
    /**
     * -仓库名称 -20
     */
    @ApiModelProperty(value = "仓库名称", required = true)
    @NotBlank(message = "仓库名称不能为空")
    @Length(max = 20, message = "仓库名称长度20不正确")
    private String wareCn;
    /**
     * -操作时间 -19
     */
    @ApiModelProperty(value = "操作时间", required = true)
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @NotNull(message = "操作时间不能为空")
    private Date createTime;
    /**
     * -发货地址（仅是发货状态下） -50
     */
    @ApiModelProperty(value = "发货地址（仅是发货状态下）", required = true)
    @NotBlank(message = "发货地址（仅是发货状态下）不能为空")
    @Length(max = 50, message = "发货地址（仅是发货状态下）长度50不正确")
    private String addressCn;
    /**
     * -操作人ID -10
     */
    @ApiModelProperty(value = "操作人ID", required = true)
    @NotNull(message = "操作人ID不能为空")
    private Integer operatorId;
    /**
     * -操作人姓名 -20
     */
    @ApiModelProperty(value = "操作人姓名", required = true)
    @NotBlank(message = "操作人姓名不能为空")
    @Length(max = 20, message = "操作人姓名长度20不正确")
    private String operator;
    /**
     * -复核人ID -10
     */
    @ApiModelProperty(value = "复核人ID", required = true)
    @NotNull(message = "复核人ID不能为空")
    private Integer checkId;
    /**
     * -复核人姓名 -20
     */
    @ApiModelProperty(value = "复核人姓名", required = true)
    @NotBlank(message = "复核人姓名不能为空")
    @Length(max = 20, message = "复核人姓名长度20不正确")
    private String checker;

}
