package com.jasamedika.medifirst2000.entities;

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 = "PapDetailRiwayatImunisasiDasar_T")
public class PapDetailRiwayatImunisasiDasar extends BaseTransaction{
	/**
	 * @author andri
	 */
	private static final long serialVersionUID = 1L;

	@ManyToOne
	@JoinColumn(name = "ObjectPAPriwayatImunisasiDasarFk")
	@NotNull(message = "paPriwayatImunisasiDasar tidak boleh kosong")
	@Caption(value = "Object paPriwayatImunisasiDasar")
	private PapRiwayatImunisasiDasar paPriwayatImunisasiDasar;

	@Column(name = "ObjectPAPriwayatImunisasiDasarFk", columnDefinition = "CHAR(32)", insertable = false, updatable = false, nullable = false)
	private String paPriwayatImunisasiDasarId;
	
	@ManyToOne
	@JoinColumn(name = "ObjectImunisasiFk")
	@NotNull(message = "imunisasi tidak boleh kosong")

	@Caption(value = "Object imunisasi")
	private GenericView imunisasi;

	@Column(name = "ObjectImunisasiFk", insertable = false, updatable = false, nullable = false)
	private Integer imunisasiId;
	
	//@NotNull(message = "keterangan tidak boleh kosong")
	@Column(name = "keterangan")
	@Caption(value = "keterangan")
	private String keterangan;

	public PapRiwayatImunisasiDasar getPaPriwayatImunisasiDasar() {
		return paPriwayatImunisasiDasar;
	}

	public void setPaPriwayatImunisasiDasar(PapRiwayatImunisasiDasar paPriwayatImunisasiDasar) {
		this.paPriwayatImunisasiDasar = paPriwayatImunisasiDasar;
	}



	public GenericView getImunisasi() {
		return imunisasi;
	}

	public void setImunisasi(GenericView imunisasi) {
		this.imunisasi = imunisasi;
	}

	public Integer getImunisasiId() {
		return imunisasiId;
	}

	public void setImunisasiId(Integer imunisasiId) {
		this.imunisasiId = imunisasiId;
	}

	public String getKeterangan() {
		return keterangan;
	}

	public void setKeterangan(String keterangan) {
		this.keterangan = keterangan;
	}
	
	
}
