package com.jasamedika.medifirst2000.entities;

import javax.persistence.*;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.jasamedika.medifirst2000.helper.Caption;
import lombok.Getter;
import lombok.Setter;

import static javax.persistence.FetchType.LAZY;
import static javax.persistence.GenerationType.SEQUENCE;

@Getter
@Setter
@Entity
@Table(name = "Evaluasi_M")
@JsonIgnoreProperties({ "hibernateLazyInitializer", "handler" })
public class Evaluasi extends BaseKeyValueMaster {

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

	@ManyToOne(fetch = LAZY)
	@Caption(value = "Object Diagnosi Keperawatan")
	@JoinColumn(name = "ObjectDiagnosaKeperawatanFk")
	private DiagnosaKeperawatan diagnosaKeperawatan;

	@Column(name = "ObjectDiagnosaKeperawatanFk", insertable = false, updatable = false)
	private Integer diagnosaKeperawatanId;

	@ManyToOne(fetch = LAZY)
	@Caption(value = "Object Head Evaluasi")
	@JoinColumn(name = "ObjectHeadEvaluasiFk")
	private Evaluasi headEvaluasi;

	@Column(name = "ObjectHeadEvaluasiFk", insertable = false, updatable = false)
	private Integer headEvaluasiId;

}
