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 javax.persistence.Version;
import java.io.Serializable;

/**
 * @Author: Wynne.Lu
 * @CreateDate: 2019/8/23 9:14 AM
 * @Description:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_NUMBER_SERIALNO")
@Api("编码序号")
public class MesNumberSerialno extends BaseBean implements Serializable {
    private static final long serialVersionUID = -6004402998083665263L;

    @Column(name = "CURRENT_NUMBER_PREFIX")
    @ApiParam("当前编号前缀")
    private String currentNumberPrefix;

    @Column(name = "CURRENT_SERIALNO")
    @ApiParam("当前序号")
    private Integer currentSerialno;

    @Column(name = "CURRENT_NUMBER")
    @ApiParam("当前编号")
    private String currentNumber;

    @Version
    @Column(name = "LOCK_VERSION")
    @ApiParam(value = "乐观锁", example = "1")
    public transient Integer lockVersion;
}
