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;

/**
 * class KomponenPemeriksaanRangeNilaiK
 * 
 * @author Generator
 */
@Getter
@Setter
@Entity
@Table(name = "KomponenPemeriksaanRangeNilaiK_M")
public class KomponenPemeriksaanRangeNilaiK extends BaseMaster {

	@ManyToOne
	@JoinColumn(name = "ObjectJenisKelaminFk")
	@NotNull(message = "Kd Jenis Kelamin tidak boleh kosong")
	@Caption(value = "Object Jenis Kelamin")
	private JenisKelamin jenisKelamin;

	@Column(name = "ObjectJenisKelaminFk", insertable = false, updatable = false)
	private Integer jenisKelaminId;

	@ManyToOne
	@JoinColumn(name = "ObjectKelompokUmurFk")
	@NotNull(message = "Kd Kelompok Umur tidak boleh kosong")
	@Caption(value = "Object Kelompok Umur")
	private KelompokUmur kelompokUmur;

	@Column(name = "ObjectKelompokUmurFk", insertable = false, updatable = false, nullable = false)
	private Integer kelompokUmurId;

	@ManyToOne
	@JoinColumn(name = "ObjectKomponenPeriksaFk")
	@NotNull(message = "Kd Komponen Periksa tidak boleh kosong")
	@Caption(value = "Object Komponen Periksa")
	private KomponenPemeriksaan komponenPeriksa;

	@Column(name = "ObjectKomponenPeriksaFk", insertable = false, updatable = false, nullable = false)
	private Integer komponenPeriksaId;

	@ManyToOne
	@JoinColumn(name = "ObjectMetodePeriksaFk")
	@NotNull(message = "Kd Metode Periksa tidak boleh kosong")
	@Caption(value = "Object Metode Periksa")
	private MetodePemeriksaanPenunjang metodePeriksa;

	@Column(name = "ObjectMetodePeriksaFk", insertable = false, updatable = false, nullable = false)
	private Integer metodePeriksaId;

	@NotNull(message = "Keterangan Range Nilai tidak boleh kosong")
	@Column(name = "KeteranganRangeNilai", nullable = false, length = 150)
	@Caption(value = "Keterangan Range Nilai")
	private String keteranganRangeNilai;

	@NotNull(message = "No Urut tidak boleh kosong")
	@Column(name = "NoUrut", nullable = false)
	@Caption(value = "No Urut")
	private Byte noUrut;

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

}