package cn.estsh.i3plus.pojo.mes.bean;


import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * @Author: Wynne.Lu
 * @CreateDate: 2019/8/22 5:59 PM
 * @Description:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_NUMBER_RULE")
@Api("条码生成规则")
public class MesNumberRule extends BaseBean implements Serializable {
    private static final long serialVersionUID = -7547623897602721464L;

    @Column(name = "RULE_CODE")
    @ApiParam("规则代码")
    private String ruleCode;

    @Column(name = "RULE_DESC")
    @ApiParam("规则描述")
    private String ruleDesc;

    @Column(name = "PREFIX")
    @ApiParam("前缀")
    private String prefix;

    @Column(name = "NUMBER_RULE")
    @ApiParam("编码规则")
    private String numberRule;

    @Column(name = "SERIALNO_LENGTH")
    @ApiParam("序号长度")
    private Integer serialnoLength;

    @Column(name = "SERIALNO_INCREMENT")
    @ApiParam("增量")
    private Integer serialnoIncrement;

    @Column(name = "IS_CYCLE")
    @ApiParam("最大值后循环")
    private Integer isCycle;
}
