package com.prolog.rdc.tms.model.vo;

import java.io.Serializable;
import java.util.Date;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.prolog.product.core.base.group.AddGroup;
import com.prolog.product.core.base.group.EditGroup;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 号码规则 Vo
 * <p>
 * Copyright: Copyright (C) 2020 prolog-int, Inc. All rights reserved.
 * <p>
 * Company: 湖北普罗格科技股份有限公司
 *
 *
 * @author xiaoyf
 * @since 2020-06-09 10:17
 */
@Data
@ApiModel("号码规则 VO")
public class SysCodeengineVO implements Serializable {

	private static final long serialVersionUID = 1L;

	@ApiModelProperty(value = "企业ID")
	@NotBlank(message = "企业ID必填", groups = { AddGroup.class, EditGroup.class })
	@Size(max = 30, message = "企业ID最大长度30", groups = { AddGroup.class, EditGroup.class })
	private Long enterpriseId;

	@ApiModelProperty(value = "仓ID")
	@Size(max = 30, message = "仓ID最大长度30", groups = { AddGroup.class, EditGroup.class })
	private Long branchId;

	@ApiModelProperty(value = "号码代号")
	@NotBlank(message = "号码代号必填", groups = { AddGroup.class, EditGroup.class })
	@Size(max = 30, message = "号码代号最大长度30", groups = { AddGroup.class, EditGroup.class })
	private String codeid;

	@ApiModelProperty(value = "识别代号")
	@NotBlank(message = "识别代号必填", groups = { AddGroup.class, EditGroup.class })
	@Size(max = 30, message = "识别代号最大长度30", groups = { AddGroup.class, EditGroup.class })
	private String code;

	@ApiModelProperty(value = "名称")
	@NotBlank(message = "名称必填", groups = { AddGroup.class, EditGroup.class })
	@Size(max = 30, message = "名称最大长度30", groups = { AddGroup.class, EditGroup.class })
	private String name;

	@ApiModelProperty(value = "号码类型分类")
	@NotBlank(message = "号码类型分类必填", groups = { AddGroup.class, EditGroup.class })
	@Size(max = 30, message = "号码类型分类最大长度30", groups = { AddGroup.class, EditGroup.class })
	private String codetype;

	@ApiModelProperty(value = "值类型")
	@NotBlank(message = "值类型必填", groups = { AddGroup.class, EditGroup.class })
	@Size(max = 30, message = "值类型最大长度30", groups = { AddGroup.class, EditGroup.class })
	private String codedatatype;

	@ApiModelProperty(value = "标识符")
	@Size(max = 30, message = "标识符最大长度30", groups = { AddGroup.class, EditGroup.class })
	private String codeflag;

	@ApiModelProperty(value = "长度")
	@NotBlank(message = "长度必填", groups = { AddGroup.class, EditGroup.class })
	private Integer length;

	@ApiModelProperty(value = "间隔")
	@NotBlank(message = "间隔必填", groups = { AddGroup.class, EditGroup.class })
	private Integer gap;

	@ApiModelProperty(value = "最大单据号")
	@Size(max = 30, message = "最大单据号最大长度30", groups = { AddGroup.class, EditGroup.class })
	private String maxbillno;

	@ApiModelProperty(value = "号码规则")
	@Size(max = 30, message = "号码规则最大长度30", groups = { AddGroup.class, EditGroup.class })
	private String billrule;

	@ApiModelProperty(value = "是否段资源定义")
	@Size(max = 1, message = "是否段资源定义最大长度1", groups = { AddGroup.class, EditGroup.class })
	private String issegsource;

	@ApiModelProperty(value = "段代码取法")
	@Size(max = 300, message = "段代码取法最大长度300", groups = { AddGroup.class, EditGroup.class })
	private String segcodesql;

	@ApiModelProperty(value = "父识别号")
	@Size(max = 30, message = "父识别号最大长度30", groups = { AddGroup.class, EditGroup.class })
	private String groupid;

	@ApiModelProperty(value = "最后修改时间(废弃字段，代码调整后请删除)")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date lastdate;

	@ApiModelProperty(value = "备注")
	@Size(max = 500, message = "备注最大长度500", groups = { AddGroup.class, EditGroup.class })
	private String remark;

}
