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 static javax.persistence.FetchType.LAZY;
import static javax.persistence.GenerationType.SEQUENCE;

@Getter
@Setter
@Entity
@Table(name = "sdm_kategoripenilaiankualitas_m")
public class KategoriPenilaianKualitas extends BaseMaster {

	@Caption(value = "Nilai Kategori")
	@Column(name = "nilaikategoripenilaiankualitas")
	private String nilaiKategoriPenilaianKualitas;

	@Caption(value = "Keterangan Nilai Kategori")
	@Column(name = "ketNilaikategoripenilaiankualitas")
	private String ketNilaiKategoriPenilaianKualitas;

	@ManyToOne(fetch = LAZY)
	@JoinColumn(name = "objectindikatorkualitasfk")
	@Caption(value = "Indikator Kualitas")
	private IndikatorKualitas indikatorKualitas;

	@Column(name = "objectindikatorkualitasfk", insertable = false, updatable = false)
	private Integer idIndikatorKualitas;

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

}
