package com.eactive.eai.rms.data.entity.onl.sequence;

import com.eactive.eai.data.entity.AbstractEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NonNull;

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

@Data
@EqualsAndHashCode(onlyExplicitlyIncluded = true, callSuper = true)

@Entity
@Table(name = "tseaisq01")
@org.hibernate.annotations.Table(appliesTo = "tseaisq01")
public class SequenceEntity extends AbstractEntity<String> implements Serializable {

	@Id
	@Column(unique = true, nullable = false, length = 255)
	private String sequence_name;

	@Getter
	@Column(precision = 22)
	private Long next_val;

	@Override
	public @NonNull String getId() {
		return sequence_name;
	}

}