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 org.hibernate.validator.constraints.Range;
import lombok.Data;

/**
 * -rfid基本信息子表，保存冠字号段信息添加请求bean
 */
@Data
public class BaseInfoSubReq 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 baseInfoId;
    /**
     * -编号:沈币产品自有编号 -20
     */
    @ApiModelProperty(value = "编号:沈币产品自有编号", required = true)
    @NotBlank(message = "编号:沈币产品自有编号不能为空")
    @Length(max = 20, message = "编号:沈币产品自有编号长度20不正确")
    private String serialNumber;
    /**
     * -冠字号前缀 -10
     */
    @ApiModelProperty(value = "冠字号前缀", required = true)
    @NotBlank(message = "冠字号前缀不能为空")
    @Length(max = 10, message = "冠字号前缀长度10不正确")
    private String crownPrefix;
    /**
     * -起始值 -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;

}
