package com.jasamedika.medifirst2000.entities;

import com.jasamedika.medifirst2000.base.BaseTransaction;
import com.jasamedika.medifirst2000.helper.Caption;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.util.Date;

import static javax.persistence.FetchType.LAZY;

/**
 * class PelayananPasienPetugas
 * 
 * @author Generator
 */
@Getter
@Setter
@Entity
@Table(name = "PelayananPasienPetugas_T")
public class PelayananPasienPetugas extends BaseTransaction {
	private static final long serialVersionUID = -2586717488353074662L;

	@Caption(value = "Deskripsi Tugas Fungsi")
	private String deskripsitugasfungsi;

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

	@ManyToOne(fetch = LAZY)
	@JoinColumn(name = "PelayananPasien")
	@NotNull(message = "Object Asal Produk Harus Diisi")
	@Caption(value = "Object Asal Produk")
	private PelayananPasien pelayananPasien;

	@Column(name = "PelayananPasien", insertable = false, updatable = false)
	private String pelayananPasienId;

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

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

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

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

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

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

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

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

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

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

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

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

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

	@Column(name = "asaid")
	@Caption(value = "Jenis Klasifikasi ASA")
	private Byte asaId;
}
