package com.jasamedika.medifirst2000.entities;

import java.util.Date;

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

import com.jasamedika.medifirst2000.base.BaseTransaction;
import com.jasamedika.medifirst2000.helper.Caption;import org.hibernate.envers.Audited;

@Entity //@Audited
@Table(name="PapAssesmentGizi_T")
public class PapAssesmentGizi extends BaseTransaction{
	@ManyToOne
	@JoinColumn(name = "ObjectRegistrasiPelayananPasienFk")
	//@NotNull(message = "RegistrasiPelayananPasien tidak boleh kosong")
	private RegistrasiPelayananPasien registrasiPelayananPasien;	
	
	@Column(name = "ObjectRegistrasiPelayananPasienFk", columnDefinition = "CHAR(32)", insertable = false, updatable = false, nullable = true)
	private String registrasiPelayananPasienId;

	@ManyToOne
	@JoinColumn(name = "ObjectPasienFk")
	@NotNull(message = "Pasien tidak boleh kosong")
	private Pasien pasien;	
	
	@Column(name = "ObjectPasienFk", insertable = false, updatable = false, nullable = false)
	private Integer pasienId;
	
	@NotNull(message = "Tgl Input tidak boleh kosong")
	@Column(name = "tglInput", nullable = false)
	@Caption(value = "Tgl Input")
	private Date tglInput;
	
	@ManyToOne
	@JoinColumn(name = "ObjectTindakLanjutFk")
	@NotNull(message = "Tindak Lanjut tidak boleh kosong")
	private GenericView tindakLanjut;
	
	@Column(name = "ObjectTindakLanjutFk", insertable = false, updatable = false, nullable = false)
	private Integer tindakLanjutId;
	
	public RegistrasiPelayananPasien getRegistrasiPelayananPasien() {
		return registrasiPelayananPasien;
	}

	public void setRegistrasiPelayananPasien(RegistrasiPelayananPasien registrasiPelayananPasien) {
		this.registrasiPelayananPasien = registrasiPelayananPasien;
	}

	public Pasien getPasien() {
		return pasien;
	}

	public void setPasien(Pasien pasien) {
		this.pasien = pasien;
	}

	public Date getTglInput() {
		return tglInput;
	}

	public void setTglInput(Date tglInput) {
		this.tglInput = tglInput;
	}

	public GenericView getTindakLanjut() {
		return tindakLanjut;
	}

	public void setTindakLanjut(GenericView tindakLanjut) {
		this.tindakLanjut = tindakLanjut;
	}
	
}
