package com.jasamedika.medifirst2000.entities;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;

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

@Entity
@Table(name = "pelayananpasiennakes_t")
public class PelayananPasienNakes extends BaseTransaction {

	@ManyToOne(fetch = FetchType.LAZY)
	@NotNull(message = "Nomor Registrasi Harus Diisi")
	@JoinColumn(name = "noregistrasifk")
	@Caption(value = "Nomor Registrasi")
	private AntrianPasienDiPeriksa antrianPasienDiperiksa;

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

	@ManyToOne(fetch = FetchType.LAZY)
	@NotNull(message = "Produk Nakes tidak boleh kosong")
	@JoinColumn(name = "objectproduknakesfk")
	@Caption(value = "Produk Nakes")
	private ProdukNakes produk;

	@Column(name = "objectproduknakesfk", insertable = false, updatable = false, nullable = false)
	private Integer produkId;

	@Column(name = "tglpelayanan", nullable = false)
	@Caption(value = "Tanggal Pelayanan")
	@Temporal(TemporalType.TIMESTAMP)
	private Date tglPelayanan;

	@Column(name = "skor", nullable = false)
	@Caption(value = "Nilai Skor")
	private Double skor;

	@Column(name = "jumlah", nullable = false)
	@Caption(value = "Jumlah")
	private Double jumlah;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "objectpegawaifk")
	@Caption(value = "Pegawai")
	private Pegawai pegawai;

	@Column(name = "objectpegawaifk", insertable = false, updatable = false, nullable = true)
	private Integer pegawaiId;

	public AntrianPasienDiPeriksa getAntrianPasienDiperiksa() {
		return antrianPasienDiperiksa;
	}

	public void setAntrianPasienDiperiksa(AntrianPasienDiPeriksa antrianPasienDiperiksa) {
		this.antrianPasienDiperiksa = antrianPasienDiperiksa;
	}

	public String getAntrianPasienDiperiksaId() {
		return antrianPasienDiperiksaId;
	}

	public void setAntrianPasienDiperiksaId(String antrianPasienDiperiksaId) {
		this.antrianPasienDiperiksaId = antrianPasienDiperiksaId;
	}

	public ProdukNakes getProduk() {
		return produk;
	}

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

	public Integer getProdukId() {
		return produkId;
	}

	public void setProdukId(Integer produkId) {
		this.produkId = produkId;
	}

	public Date getTglPelayanan() {
		return tglPelayanan;
	}

	public void setTglPelayanan(Date tglPelayanan) {
		this.tglPelayanan = tglPelayanan;
	}

	public Double getSkor() {
		return skor;
	}

	public void setSkor(Double skor) {
		this.skor = skor;
	}

	public Double getJumlah() {
		return jumlah;
	}

	public void setJumlah(Double jumlah) {
		this.jumlah = jumlah;
	}

	public Pegawai getPegawai() {
		return pegawai;
	}

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

	public Integer getPegawaiId() {
		return pegawaiId;
	}

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

}
