package com.jasamedika.medifirst2000.vo;

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

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

import com.jasamedika.medifirst2000.base.BaseTransaction;
import com.jasamedika.medifirst2000.base.vo.BaseTransactionVO;
import com.jasamedika.medifirst2000.helper.Caption;

public class PapRencanaOrderLaboratoriumVO extends BaseTransactionVO{
	@ManyToOne
	@JoinColumn(name = "ObjectRegistrasiPelayananPasienFk")
	//@NotNull(message = "RegistrasiPelayananPasien tidak boleh kosong")
	private RegistrasiPelayananPasienVO registrasiPelayananPasien;	
	
	@Column(name = "ObjectRegistrasiPelayananPasienFk", insertable = false, updatable = false, nullable = true)
	private String registrasiPelayananPasienId;

	@ManyToOne
	@JoinColumn(name = "ObjectPasienFk")
	@NotNull(message = "Pasien tidak boleh kosong")
	private PasienVO 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;

	@OneToMany
	@Caption(value = "ProdukSet")	
	private Set<ProdukVO> produkSet=new HashSet<ProdukVO>();
	
	public RegistrasiPelayananPasienVO getRegistrasiPelayananPasien() {
		return registrasiPelayananPasien;
	}

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

	public PasienVO getPasien() {
		return pasien;
	}

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

	public Date getTglInput() {
		return tglInput;
	}

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

	public Set<ProdukVO> getProdukSet() {
		return produkSet;
	}

	public void setProdukSet(Set<ProdukVO> produkSet) {
		this.produkSet = produkSet;
	}
	
}
