package com.jasamedika.medifirst2000.entities;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import com.fasterxml.jackson.annotation.JsonBackReference;
import com.jasamedika.medifirst2000.base.BaseTransaction;
import com.jasamedika.medifirst2000.helper.Caption;

@Entity
@Table(name="PengkajianKebutuhanDasar_T")
public class PengkajianKebutuhanDasar extends BaseTransaction{

	@ManyToOne(fetch=FetchType.LAZY)
	@Caption(value = "antrianPasienDiPeriksa")
	@JoinColumn(name = "ObjectantrianPasienDiPeriksaFk")
	private AntrianPasienDiPeriksa antrianPasienDiPeriksa;	
	
	@Column(name = "ObjectantrianPasienDiPeriksaFk", columnDefinition = "CHAR(32)", insertable = false, updatable = false)
	private String antrianPasienDiPeriksaId;
	
	@ManyToOne(fetch=FetchType.LAZY)
	@Caption(value = "pengkajianAwalBaru")
	@JoinColumn(name = "ObjectPengkajianAwalBaruFk")
	private PengkajianAwalBaru pengkajianAwalBaru;
	
	@Column(name = "ObjectPengkajianAwalBaruFk", columnDefinition = "CHAR(32)", insertable = false, updatable = false)
	private String pengkajianAwalBaruId;
	
	@JsonBackReference
	@OneToMany(cascade=CascadeType.ALL,fetch = FetchType.LAZY, mappedBy = "pengkajianKebutuhanDasar")
	private Set<MapPengkajianKebutuhanDasar> kebutuhanDasar = new HashSet<>();

	public AntrianPasienDiPeriksa getAntrianPasienDiPeriksa() {
		return antrianPasienDiPeriksa;
	}

	public void setAntrianPasienDiPeriksa(AntrianPasienDiPeriksa antrianPasienDiPeriksa) {
		this.antrianPasienDiPeriksa = antrianPasienDiPeriksa;
	}

	public String getAntrianPasienDiPeriksaId() {
		return antrianPasienDiPeriksaId;
	}

	public void setAntrianPasienDiPeriksaId(String antrianPasienDiPeriksaId) {
		this.antrianPasienDiPeriksaId = antrianPasienDiPeriksaId;
	}

	public PengkajianAwalBaru getPengkajianAwalBaru() {
		return pengkajianAwalBaru;
	}

	public void setPengkajianAwalBaru(PengkajianAwalBaru pengkajianAwalBaru) {
		this.pengkajianAwalBaru = pengkajianAwalBaru;
	}

	public String getPengkajianAwalBaruId() {
		return pengkajianAwalBaruId;
	}

	public void setPengkajianAwalBaruId(String pengkajianAwalBaruId) {
		this.pengkajianAwalBaruId = pengkajianAwalBaruId;
	}

	public Set<MapPengkajianKebutuhanDasar> getKebutuhanDasar() {
		return kebutuhanDasar;
	}

	public void setKebutuhanDasar(Set<MapPengkajianKebutuhanDasar> kebutuhanDasar) {
		this.kebutuhanDasar = kebutuhanDasar;
	}

}
