package com.jasamedika.medifirst2000.entities;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

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

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

	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "public.Evaluasi_m_id_seq")
	@javax.persistence.SequenceGenerator(name = "public.Evaluasi_m_id_seq", sequenceName = "public.Evaluasi_m_id_seq", allocationSize = 1)
	@Column(name = "id")
	protected Integer id;
	
	@ManyToOne(fetch=FetchType.LAZY)
	@Caption(value="Object Diagnosi Keperawatan")
	@JoinColumn(name = "ObjectDiagnosaKeperawatanFk")
	private DiagnosaKeperawatan diagnosaKeperawatan;
	
	@Column(name = "ObjectDiagnosaKeperawatanFk", insertable=false,updatable=false, nullable=true)
	private Integer diagnosaKeperawatanId;
	
	@ManyToOne(fetch=FetchType.LAZY)
	@Caption(value="Object Head Evaluasi")
	@JoinColumn(name = "ObjectHeadEvaluasiFk")
	private Evaluasi headEvaluasi;
	
	@Column(name = "ObjectHeadEvaluasiFk", insertable=false, updatable=false, nullable=true)
	private Integer headEvaluasiId;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public DiagnosaKeperawatan getDiagnosaKeperawatan() {
		return diagnosaKeperawatan;
	}

	public void setDiagnosaKeperawatan(DiagnosaKeperawatan diagnosaKeperawatan) {
		this.diagnosaKeperawatan = diagnosaKeperawatan;
	}

	public Integer getDiagnosaKeperawatanId() {
		return diagnosaKeperawatanId;
	}

	public void setDiagnosaKeperawatanId(Integer diagnosaKeperawatanId) {
		this.diagnosaKeperawatanId = diagnosaKeperawatanId;
	}

	public Evaluasi getHeadEvaluasi() {
		return headEvaluasi;
	}

	public void setHeadEvaluasi(Evaluasi headEvaluasi) {
		this.headEvaluasi = headEvaluasi;
	}

	public Integer getHeadEvaluasiId() {
		return headEvaluasiId;
	}

	public void setHeadEvaluasiId(Integer headEvaluasiId) {
		this.headEvaluasiId = headEvaluasiId;
	}

}
