package com.jasamedika.medifirst2000.vo;

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 com.fasterxml.jackson.annotation.JsonBackReference;
import com.fasterxml.jackson.annotation.JsonManagedReference;
import com.jasamedika.medifirst2000.base.BaseTransaction;
import com.jasamedika.medifirst2000.base.vo.BaseTransactionVO;
import com.jasamedika.medifirst2000.helper.Caption;

public class PioVO extends BaseTransactionVO {
	
	@ManyToOne
	@Caption(value="Pasien")
	private PasienVO pasien;
	
	public PasienVO getPasien() {
		return pasien;
	}

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

	@ManyToOne
	@Caption(value="Pegawai")
	private PegawaiVO pegawai;
	
	@Column(name = "objectPegawaiFk", insertable=false,updatable=false,nullable=true)
	private Integer pegawaiId;
	
	@ManyToOne
	@Caption(value="Produk")
	private ProdukVO produk;
	
	@OneToMany(cascade=CascadeType.ALL,fetch = FetchType.LAZY, mappedBy = "Pio")
	private Set<DetailPioVO> detailPio=new HashSet<DetailPioVO>();
	
	@Column(name = "namaPenanya")
	private String namaPenanya;
	
	@Column(name = "bagian")
	private String bagian;
	
	@Column(name = "noTelepon")
	private String noTelepon;
	
	@Column(name = "kategori")
	private String kategori;
	

	public Integer getPegawaiId() {
		return pegawaiId;
	}

	public void setPegawaiId(Integer pegawaiId) {
		this.pegawaiId = pegawaiId;
	}

	public PegawaiVO getPegawai() {
		return pegawai;
	}

	public void setPegawai(PegawaiVO pegawai) {
		this.pegawai = pegawai;
	}

	public ProdukVO getProduk() {
		return produk;
	}

	public void setProduk(ProdukVO produk) {
		this.produk = produk;
	}

	public Set<DetailPioVO> getDetailPio() {
		return detailPio;
	}

	public void setDetailPio(Set<DetailPioVO> detailPio) {
		this.detailPio = detailPio;
	}

	public String getNamaPenanya() {
		return namaPenanya;
	}

	public void setNamaPenanya(String namaPenanya) {
		this.namaPenanya = namaPenanya;
	}

	public String getBagian() {
		return bagian;
	}

	public void setBagian(String bagian) {
		this.bagian = bagian;
	}

	public String getNoTelepon() {
		return noTelepon;
	}

	public void setNoTelepon(String noTelepon) {
		this.noTelepon = noTelepon;
	}

	public String getKategori() {
		return kategori;
	}

	public void setKategori(String kategori) {
		this.kategori = kategori;
	}

	
	
}

