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;

/**
 * @author Andri
 */
@Entity
@Table(name = "PapAlergi_T")
public class PapAlergi extends BaseTransaction {

	@ManyToOne
	@JoinColumn(name = "ObjectRegistrasiPelayananPasienFk")
	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 AntrianPasienDiPeriksa pasienDaftar;

	@Column(name = "ObjectPasienFk", columnDefinition = "CHAR(32)", insertable = false, updatable = false, nullable = false)
	private String pasienId;

	@NotNull(message = "Tgl Input tidak boleh kosong")
	@Column(name = "tglInput", nullable = false)
	@Caption(value = "Tgl Input")
	private Date tglInput;

	@ManyToOne
	@JoinColumn(name = "ObjectAlergiFk")
	@NotNull(message = "alergi tidak boleh kosong")
	@Caption(value = "Object alergi")
	private Alergi alergi;

	@Column(name = "ObjectAlergiFk", insertable = false, updatable = false, nullable = false)
	private Integer alergiId;

	@NotNull(message = "Keterangan Data tidak boleh kosong")
	@Column(name = "keteranganData", nullable = false)
	@Caption(value = "Keterangan Data")
	private String keteranganData;

	@NotNull(message = "Reaksi tidak boleh kosong")
	@Column(name = "reaksi", nullable = false)
	@Caption(value = "Reaksi")
	private String reaksi;

	public Integer getAlergiId() {
		return alergiId;
	}

	public void setAlergiId(Integer alergiId) {
		this.alergiId = alergiId;
	}

	public RegistrasiPelayananPasien getRegistrasiPelayananPasien() {
		return registrasiPelayananPasien;
	}

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

	public AntrianPasienDiPeriksa getPasien() {
		return pasienDaftar;
	}

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

	public Date getTglInput() {
		return tglInput;
	}

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

	public Alergi getAlergi() {
		return alergi;
	}

	public void setAlergi(Alergi alergi) {
		this.alergi = alergi;
	}

	public String getKeteranganData() {
		return keteranganData;
	}

	public void setKeteranganData(String keteranganData) {
		this.keteranganData = keteranganData;
	}

	public String getReaksi() {
		return reaksi;
	}

	public void setReaksi(String reaksi) {
		this.reaksi = reaksi;
	}
}
