package com.sy.coinage.workshop.req;

import com.baomidou.mybatisplus.annotation.TableField;
import com.sy.coinage.core.annotation.FastJsonFieldProfile;
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 DeliveryPlanReq implements Serializable {

    private static final long serialVersionUID = 1L;
    @NotNull(message = "id不能为空", groups = {Update.class})
    @Range(min = 1, groups = {Update.class})
    private Integer id;

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

    @ApiModelProperty(value = "入库地点ID", required = true)
    @NotNull(message = "入库地点不能为空")
    private String addressIds;

    @ApiModelProperty(value = "解缴时间（yyyy-MM-dd）", required = true)
    @JSONField(format = "yyyy-MM-dd")
    @NotNull(message = "解缴时间不能为空")
    private Date planDeliveryDate;

    @ApiModelProperty(value = "数量（万枚）", required = true)
    @NotNull(message = "数量不能为空")
    private Integer qty;

    @ApiModelProperty(value = "首箱冠字号(根据首箱冠字号，与首拍箱数)", required = true)
//    @NotBlank(message = "首箱冠字号(根据首箱冠字号，与首拍箱数)不能为空")
    @Length(max = 20, message = "首箱冠字号(根据首箱冠字号，与首拍箱数)长度不正确,最大长度20字符")
    private String firstCrown;

    @ApiModelProperty(value = "首拍编号", required = true)
//    @NotBlank(message = "首拍编号不能为空")
    @Length(max = 20, message = "首拍编号长度不正确,最大长度20字符")
    private String firstSerialNumber;

    @ApiModelProperty(value = "首拍箱数(根据首拍箱数)", required = true)
//    @NotNull(message = "首拍箱数(根据首拍箱数)不能为空")
    private Integer firstBoxNum;

    @ApiModelProperty(value = "冠字号范围", required = true)
    @Length(max = 255, message = "crownBetween长度不正确,最大长度100字符")
    private String crownBetween;

    @ApiModelProperty(value = "拍号字符串（将拍号按照规则，组装成字符串）", required = true)
    @Length(max = 255, message = "拍号字符串长度不正确,最大长度255字符")
    private String parBetween;

    @ApiModelProperty(value = "开始跳号ID字符串（多个用逗号分割），冗余字段")
    @Length(max = 20, message = "开始跳号长度不正确,最大长度20字符")
    private String startIds;

    @ApiModelProperty(value = "结束跳号id字符串（多ID用逗号分割）冗余字段", required = true)
    @Length(max = 20, message = "结束跳号长度不正确,最大长度20字符")
    private String endIds;

    @ApiModelProperty(value = "按新号排列 1是 2否")
    @NotNull(message = "是否按新号排列不能为空")
    private Integer resetSerialNumber;

    @ApiModelProperty(value = "新发货单号")
    private String newOrderNo;

    @ApiModelProperty(value = "备注")
    @Length(max = 255, message = "备注长度不正确,最大长度255字符")
    private String remark;

}
