package com.jasamedika.medifirst2000.entities;

import com.jasamedika.medifirst2000.base.BaseMaster;
import com.jasamedika.medifirst2000.helper.Caption;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;
import javax.validation.constraints.NotNull;

import static javax.persistence.GenerationType.SEQUENCE;

@Getter
@Setter
@Entity
@Table(name = "AsalRujukan_M")
public class AsalRujukan extends BaseMaster {

	@Id
	@GeneratedValue(strategy = SEQUENCE, generator = "public.asalrujukan_m_id_seq")
	@SequenceGenerator(name = "public.asalrujukan_m_id_seq", sequenceName = "public.asalrujukan_m_id_seq", allocationSize = 1)
	@Column(name = "id")
	protected Integer id;

	@NotNull(message = "Asal Rujukan tidak boleh kosong")
	@Column(name = "AsalRujukan", nullable = false, length = 30)
	@Caption(value = "Asal Rujukan")
	private String asalRujukan;

	@NotNull(message = "Kd Asal Rujukan tidak boleh kosong")
	@Column(name = "KdAsalRujukan", nullable = false, length = 1)
	@Caption(value = "Kode Asal Rujukan")
	private String kdAsalRujukan;

	@NotNull(message = "QAsal Rujukan tidak boleh kosong")
	@Column(name = "QAsalRujukan", nullable = false)
	@Caption(value = "QAsal Rujukan")
	private Byte qAsalRujukan;

}