package com.foreverwin.mesnac.common.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 编码规则
 * </p>
 *
 * @author Helios
 * @since 2021-01-22
 */
@TableName("Z_NEXT_NUMBER")
public class NextNumber extends Model<NextNumber> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
   @TableId(value = "HANDLE", type = IdType.INPUT)
   private String handle;
    /**
     * 站点
     */
   @TableField("SITE")
   private String site;
    /**
     * 厂区
     */
   @TableField("WORK_CENTER")
   private String workCenter;
    /**
     * 编号类型
     */
   @TableField("NUMBER_TYPE")
   private String numberType;
    /**
     * 前缀
     */
   @TableField("PREFIX")
   private String prefix;
    /**
     * 后缀
     */
   @TableField("POSTFIX")
   private String postfix;
    /**
     * 序列长度
     */
   @TableField("SEQUENCE_LENGTH")
   private BigDecimal sequenceLength;
    /**
     * 样本
     */
   @TableField("SAMPLE")
   private String sample;
    /**
     * 重复：日：Day；永不：NoEver；月：Mouth；年：Year
     */
   @TableField("REPETITION")
   private String repetition;
    /**
     * 备注
     */
   @TableField("REMARKS")
   private String remarks;
    /**
     * 默认开始序号
     */
   @TableField("START_SEQUENCE")
   private BigDecimal startSequence;
    /**
     * 是否允许跳号(Y:允许 N:不允许)
     */
   @TableField("SKIP_NUMBER")
   private String skipNumber;
    /**
     * 创建人员
     */
   @TableField("CREATED_USER_BO")
   private String createdUserBo;
    /**
     * 创建日期
     */
   @TableField("CREATED_DATE_TIME")
   private LocalDateTime createdDateTime;


   public String getHandle() {
      return handle;
   }

   public void setHandle(String handle) {
      this.handle = handle;
   }

   public String getSite() {
      return site;
   }

   public void setSite(String site) {
      this.site = site;
   }

   public String getWorkCenter() {
      return workCenter;
   }

   public void setWorkCenter(String workCenter) {
      this.workCenter = workCenter;
   }

   public String getNumberType() {
      return numberType;
   }

   public void setNumberType(String numberType) {
      this.numberType = numberType;
   }

   public String getPrefix() {
      return prefix;
   }

   public void setPrefix(String prefix) {
      this.prefix = prefix;
   }

   public String getPostfix() {
      return postfix;
   }

   public void setPostfix(String postfix) {
      this.postfix = postfix;
   }

   public BigDecimal getSequenceLength() {
      return sequenceLength;
   }

   public void setSequenceLength(BigDecimal sequenceLength) {
      this.sequenceLength = sequenceLength;
   }

   public String getSample() {
      return sample;
   }

   public void setSample(String sample) {
      this.sample = sample;
   }

   public String getRepetition() {
      return repetition;
   }

   public void setRepetition(String repetition) {
      this.repetition = repetition;
   }

   public String getRemarks() {
      return remarks;
   }

   public void setRemarks(String remarks) {
      this.remarks = remarks;
   }

   public BigDecimal getStartSequence() {
      return startSequence;
   }

   public void setStartSequence(BigDecimal startSequence) {
      this.startSequence = startSequence;
   }

   public String getSkipNumber() {
      return skipNumber;
   }

   public void setSkipNumber(String skipNumber) {
      this.skipNumber = skipNumber;
   }

   public String getCreatedUserBo() {
      return createdUserBo;
   }

   public void setCreatedUserBo(String createdUserBo) {
      this.createdUserBo = createdUserBo;
   }

   public LocalDateTime getCreatedDateTime() {
      return createdDateTime;
   }

   public void setCreatedDateTime(LocalDateTime createdDateTime) {
      this.createdDateTime = createdDateTime;
   }

   public static final String HANDLE = "HANDLE";

   public static final String SITE = "SITE";

   public static final String WORK_CENTER = "WORK_CENTER";

   public static final String NUMBER_TYPE = "NUMBER_TYPE";

   public static final String PREFIX = "PREFIX";

   public static final String POSTFIX = "POSTFIX";

   public static final String SEQUENCE_LENGTH = "SEQUENCE_LENGTH";

   public static final String SAMPLE = "SAMPLE";

   public static final String REPETITION = "REPETITION";

   public static final String REMARKS = "REMARKS";

   public static final String START_SEQUENCE = "START_SEQUENCE";

   public static final String SKIP_NUMBER = "SKIP_NUMBER";

   public static final String CREATED_USER_BO = "CREATED_USER_BO";

   public static final String CREATED_DATE_TIME = "CREATED_DATE_TIME";


   @Override
   protected Serializable pkVal() {
      return this.handle;
   }

   @Override
   public String toString() {
      return "NextNumber{" +
         "handle = " + handle +
         ", site = " + site +
         ", workCenter = " + workCenter +
         ", numberType = " + numberType +
         ", prefix = " + prefix +
         ", postfix = " + postfix +
         ", sequenceLength = " + sequenceLength +
         ", sample = " + sample +
         ", repetition = " + repetition +
         ", remarks = " + remarks +
         ", startSequence = " + startSequence +
         ", skipNumber = " + skipNumber +
         ", createdUserBo = " + createdUserBo +
         ", createdDateTime = " + createdDateTime +
         "}";
   }
}