package com.jasamedika.medifirst2000.vo;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.*;
import org.joda.time.DateTime;
import org.hibernate.validator.constraints.NotEmpty;

import com.jasamedika.medifirst2000.base.BaseTransaction;
import com.jasamedika.medifirst2000.base.vo.BaseTransactionVO;
import com.jasamedika.medifirst2000.entities.Kelas;
import com.jasamedika.medifirst2000.entities.MapPelayananPasienPetugasToPegawai;

import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.internal.util.logging.Messages;

import com.fasterxml.jackson.annotation.JsonBackReference;
import com.fasterxml.jackson.annotation.JsonManagedReference;
import com.jasamedika.medifirst2000.base.BaseTransaction;
import com.jasamedika.medifirst2000.helper.Caption;

/**
 *  class PelayananPasienPetugas
 * 
 * @author Generator
 */

public class PelayananPasienPetugasVO extends BaseTransactionVO {
	@Caption(value="Deskripsi Tugas Fungsi")
	private String deskripsitugasfungsi;

	public void setDeskripsiTugasFungsi(String deskripsitugasfungsi) {
		this.deskripsitugasfungsi = deskripsitugasfungsi;
	}

	@Column(name = "DeskripsiTugasFungsi", nullable = true , length = 75)
	public String getDeskripsiTugasFungsi(){
		return this.deskripsitugasfungsi;
	}

	@Caption(value="Is Petugas Pe P Jawab")
	private Byte ispetugaspepjawab;

	public void setisPetugasPePJawab(Byte ispetugaspepjawab) {
		this.ispetugaspepjawab = ispetugaspepjawab;
	}

	@Column(name = "isPetugasPePJawab", nullable = false )
	public Byte getisPetugasPePJawab(){
		return this.ispetugaspepjawab;
	}

	@ManyToOne
	@JoinColumn(name = "ObjectAsalProdukFk")
	@NotNull(message="Object Asal Produk Harus Diisi")
	@Caption(value="Object Asal Produk")
	private AsalProdukVO kdasalproduk;

	public void setObjectAsalProduk(AsalProdukVO kdasalproduk) {
		this.kdasalproduk = kdasalproduk;
	}

	@Column(name = "KdAsalProduk", nullable = false )
	public AsalProdukVO getObjectAsalProduk(){
		return this.kdasalproduk;
	}

	@Column(name = "ObjectAsalProdukFk", insertable=false,updatable=false)
	private Integer ObjectAsalProdukId;

	
	
	
	@ManyToOne
	@JoinColumn(name = "ObjectJenisPetugasPeFk")
	@NotNull(message="Object Jenis Petugas Pe Harus Diisi")
	@Caption(value="Object Jenis Petugas Pe")
	private JenisPetugasPelaksanaVO kdjenispetugaspe;

	public void setObjectJenisPetugasPe(JenisPetugasPelaksanaVO kdjenispetugaspe) {
		this.kdjenispetugaspe = kdjenispetugaspe;
	}

	@Column(name = "KdJenisPetugasPe", nullable = false )
	public JenisPetugasPelaksanaVO getObjectJenisPetugasPe(){
		return this.kdjenispetugaspe;
	}

	@Column(name = "ObjectJenisPetugasPeFk", insertable=false,updatable=false)
	private Integer ObjectJenisPetugasPeId;

	@ManyToOne
	@JoinColumn(name = "ObjectPegawaiFk")
	@NotNull(message="Object Pegawai Harus Diisi")
	@Caption(value="Object Pegawai")
	private PegawaiVO kdpegawai;

	public void setObjectPegawai(PegawaiVO kdpegawai) {
		this.kdpegawai = kdpegawai;
	}

	@Column(name = "KdPegawai", nullable = true , length = 5)
	public PegawaiVO getObjectPegawai(){
		return this.kdpegawai;
	}

	@Column(name = "ObjectPegawaiFk", insertable=false,updatable=false)
	private Integer ObjectPegawaiId;

	@ManyToOne
	@JoinColumn(name = "ObjectProdukFk")
	@NotNull(message="Object Produk Harus Diisi")
	@Caption(value="Object Produk")
	private ProdukVO kdproduk;

	public void setObjectProduk(ProdukVO kdproduk) {
		this.kdproduk = kdproduk;
	}

	@Column(name = "KdProduk", nullable = false , length = 6)
	public ProdukVO getObjectProduk(){
		return this.kdproduk;
	}

	@Column(name = "ObjectProdukFk", insertable=false,updatable=false)
	private Integer ObjectProdukId;

	@ManyToOne
	@JoinColumn(name = "ObjectRuanganFk")
	@NotNull(message="Object Ruangan Harus Diisi")
	@Caption(value="Object Ruangan")
	private RuanganVO kdruangan;

	public void setObjectRuangan(RuanganVO kdruangan) {
		this.kdruangan = kdruangan;
	}

	@Column(name = "KdRuangan", nullable = false , length = 3)
	public RuanganVO getObjectRuangan(){
		return this.kdruangan;
	}

	@Column(name = "ObjectRuanganFk", insertable=false,updatable=false)
	private Integer ObjectRuanganId;

	@ManyToOne
	@JoinColumn(name = "NoMasukFk")
	@NotNull(message="No Masuk Harus Diisi")
	@Caption(value="No Masuk")	
	private AntrianPasienDiPeriksaVO nomasuk;

	public void setNoMasuk(AntrianPasienDiPeriksaVO nomasuk) {
		this.nomasuk = nomasuk;
	}

	
	public AntrianPasienDiPeriksaVO getNoMasuk(){
		return this.nomasuk;
	}

	@Column(name = "NoMasukFk", insertable=false,updatable=false)
	private String NoMasukId;

	@Caption(value="Tanggal Pelayanan")
	private DateTime tglpelayanan;

	public void setTanggalPelayanan(DateTime tglpelayanan) {
		this.tglpelayanan = tglpelayanan;
	}

	@Column(name = "TglPelayanan", nullable = false )
	public DateTime getTanggalPelayanan(){
		return this.tglpelayanan;
	}

	@OneToMany(cascade=CascadeType.ALL,fetch = FetchType.LAZY, mappedBy = "pelayananPasienPetugas")
	public Set<MapPelayananPasienPetugasToPegawaiVO> mapPelayananPasienPetugasToPegawaiSet = new HashSet<>();

	public Set<MapPelayananPasienPetugasToPegawaiVO> getMapPelayananPasienPetugasToPegawaiSet() {
		return mapPelayananPasienPetugasToPegawaiSet;
	}

	public void setMapPelayananPasienPetugasToPegawaiSet(
			Set<MapPelayananPasienPetugasToPegawaiVO> mapPelayananPasienPetugasToPegawaiSet) {
		this.mapPelayananPasienPetugasToPegawaiSet = mapPelayananPasienPetugasToPegawaiSet;
	}

}

