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;

/******************
 * @author Shakato
 ******************/
@Getter
@Setter
@Entity
@Table(name = "DetailTriase_M")
public class DetailTriase extends BaseMaster {

	@NotNull(message = "Kode Triase tidak boleh kosong")
	@Column(name = "kdTriase", nullable = false, length = 100)
	@Caption(value = "Kode Triase")
	private short kdTriage;

	@NotNull(message = "Nama Triase Kelulusan tidak boleh kosong")
	@Column(name = "namaTriage", nullable = false)
	@Caption(value = "Nama Triase")
	private String namaTriage;

	@NotNull(message = "Jenis Pemeriksaan tidak boleh kosong")
	@Column(name = "jenisPemeriksaan", nullable = false)
	@Caption(value = "Jenis Pemerikasaan")
	private String jenisPemeriksaan;

	@NotNull(message = "qDetailTriage tidak boleh kosong")
	@Column(name = "qDetailTriage", nullable = false)
	@Caption(value = "QDetailTriage")
	private short qDetailTriage;

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

}