package com.jasamedika.medifirst2000.entities;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.jasamedika.medifirst2000.base.BaseTransaction;
import com.jasamedika.medifirst2000.helper.Caption;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;
import java.util.Date;

import static javax.persistence.FetchType.LAZY;

@Getter
@Setter
@Entity
@Table(name = "AdmisiRencanaPindahRuangan_T")
@JsonIgnoreProperties({ "hibernateLazyInitializer", "handler" })
public class AdmisiRencanaPindahRuangan extends BaseTransaction {

	@ManyToOne(fetch = LAZY)
	@JoinColumn(name = "ObjectRegistrasiPelayananPasienFk")
	@Caption(value = "Registrasi Pelayanan Pasien")
	private AntrianPasienDiPeriksa registrasiPelayananPasien;

	@Column(name = "ObjectRegistrasiPelayananPasienFk", insertable = false, updatable = false)
	private String registrasiPelayananPasienId;

	@Caption(value = "Tanggal Keluar Rencana")
	@Column(name = "TglKeluarRencana")
	private Date tglKeluarRencana;

	@ManyToOne(fetch = LAZY)
	@JoinColumn(name = "ObjectStatusKeluarRencanaFk")
	@Caption(value = "Status Keluar Rencana")
	private StatusKeluar statusKeluarRencana;

	@Column(name = "ObjectStatusKeluarRencanaFk", insertable = false, updatable = false)
	private Integer statusKeluarRencanaId;

	@ManyToOne(fetch = LAZY)
	@JoinColumn(name = "ObjectKelasRencanaFk")
	@Caption(value = "Kelas Rencana")
	private Kelas kelasRencana;

	@Column(name = "ObjectKelasRencanaFk", insertable = false, updatable = false)
	private Integer kelasRencanaId;

	@ManyToOne(fetch = LAZY)
	@JoinColumn(name = "ObjectRuanganRencanaFk")
	@Caption(value = "Ruangan Rencana")
	private Ruangan ruanganRencana;

	@Column(name = "ObjectRuanganRencanaFk", insertable = false, updatable = false)
	private Integer ruanganRencanaId;

	@ManyToOne(fetch = LAZY)
	@JoinColumn(name = "ObjectKelasKamarRencanaFk")
	@Caption(value = "Kelas Kamar Rencana")
	private Kamar kelasKamarRencana;

	@Column(name = "ObjectKelasKamarRencanaFk", insertable = false, updatable = false)
	private Integer kelasKamarRencanaId;

	@Caption(value = "No Bed")
	@Column(name = "NoBedRencana")
	private Integer noBedRencana;

	@Caption(value = "Keterangan Lainya")
	@Column(name = "KeteranganLainya", length = 100)
	private String keteranganLainya;

	@ManyToOne(fetch = LAZY)
	@JoinColumn(name = "ObjectKelasAwalFk")
	@Caption(value = "Kelas Awal")
	private Kelas kelasAwal;

	@Column(name = "ObjectKelasAwalFk", insertable = false, updatable = false)
	private Integer kelasAwalId;

	@ManyToOne(fetch = LAZY)
	@JoinColumn(name = "ObjectRuanganAwalFk")
	@Caption(value = "Ruangan Awal")
	private Ruangan ruanganAwal;

	@Column(name = "ObjectRuanganAwalFk", insertable = false, updatable = false)
	private Integer ruanganAwalId;

	@ManyToOne(fetch = LAZY)
	@JoinColumn(name = "ObjectKelasKamarAwalFk")
	@Caption(value = "Kelas Kamar Awal")
	private Kamar kelasKamarAwal;

	@Column(name = "ObjectKelasKamarAwalFk", insertable = false, updatable = false)
	private Integer kelasKamarAwalId;

}
