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 Roc Li
 * @since 2020-09-03
 */
@TableName("Z_NEXT_NUMBER_CODE")
public class NextNumberCode extends Model<NextNumberCode> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
   @TableId(value = "HANDLE", type = IdType.INPUT)
   private String handle;
    /**
     * 站点
     */
   @TableField("SITE")
   private String site;
    /**
     * 编号规则主键
     */
   @TableField("NEXT_NUMBER_BO")
   private String nextNumberBo;
    /**
     * 编码号
     */
   @TableField("CODE")
   private String code;
    /**
     * 当前序号
     */
   @TableField("CURRENT_SEQ")
   private BigDecimal currentSeq;
    /**
     * 修改时间
     */
   @TableField("MODIFIED_DATE_TIME")
   private LocalDateTime modifiedDateTime;


   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 getNextNumberBo() {
      return nextNumberBo;
   }

   public void setNextNumberBo(String nextNumberBo) {
      this.nextNumberBo = nextNumberBo;
   }

   public String getCode() {
      return code;
   }

   public void setCode(String code) {
      this.code = code;
   }

   public BigDecimal getCurrentSeq() {
      return currentSeq;
   }

   public void setCurrentSeq(BigDecimal currentSeq) {
      this.currentSeq = currentSeq;
   }

   public LocalDateTime getModifiedDateTime() {
      return modifiedDateTime;
   }

   public void setModifiedDateTime(LocalDateTime modifiedDateTime) {
      this.modifiedDateTime = modifiedDateTime;
   }

   public static final String HANDLE = "HANDLE";

   public static final String SITE = "SITE";

   public static final String NEXT_NUMBER_BO = "NEXT_NUMBER_BO";

   public static final String CODE = "CODE";

   public static final String CURRENT_SEQ = "CURRENT_SEQ";

   public static final String MODIFIED_DATE_TIME = "MODIFIED_DATE_TIME";

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

   @Override
   public String toString() {
      return "NextNumberCode{" +
         "handle = " + handle +
         ", site = " + site +
         ", nextNumberBo = " + nextNumberBo +
         ", code = " + code +
         ", currentSeq = " + currentSeq +
         ", modifiedDateTime = " + modifiedDateTime +
         "}";
   }
}