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;

/**
 * -rfid基础信息登记表添加请求bean
 */
@Data
public class BaseInfoReq 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;

    @ApiModelProperty(value = "EPC码", required = true)
    @Length(max = 12, message = "EPC码长度12不正确")
    private String rfid;

    @ApiModelProperty(value = "封包线产品来源部门ID", required = true)
    private Integer resDeptId;

    @ApiModelProperty(value = "封包线产品来源部门名称", required = true)
    @Length(max = 255, message = "封包线产品来源部门名称长度255不正确")
    private String resDept;

    /**
     * -品名ID -10
     */
    @ApiModelProperty(value = "品名ID", required = true)
    @NotNull(message = "品名ID不能为空")
    private Integer securitiesId;

    /**
     * -编号 -20
     */
    @ApiModelProperty(value = "编号", required = true)
    @NotBlank(message = "编号不能为空")
    @Length(max = 20, message = "编号长度20不正确")
    private String serialNumber;

    /**
     * -皮重 -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;

    /**
     * -冠字号起始 -10
     */
    @ApiModelProperty(value = "冠字号起始", required = true)
    @NotBlank(message = "冠字号起始不能为空")
    @Length(max = 10, message = "冠字号起始长度10不正确")
    private String crownFrom;
    /**
     * -冠字号结束点 -10
     */
    @ApiModelProperty(value = "冠字号结束点", required = true)
    @NotBlank(message = "冠字号结束点不能为空")
    @Length(max = 10, message = "冠字号结束点长度10不正确")
    private String crownTo;

    @ApiModelProperty(value = "冠字号前缀", required = true)
    @NotBlank(message = "冠字号前缀不能为空")
    @Length(max = 10, message = "冠字号前缀长度10不正确")
    private String crownPrefix;

}
