package com.jasamedika.medifirst2000.entities;

import java.util.Date;

import javax.persistence.*;
import com.jasamedika.medifirst2000.base.BaseMaster;
import com.jasamedika.medifirst2000.helper.Caption;
import javax.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

@Entity
@Table(name = "PegawaiJadwalKerjaDokterD_M")
@JsonIgnoreProperties({ "hibernateLazyInitializer", "handler" })
public class PegawaiJadwalKerjaDokterD extends BaseMaster {

	@NotNull(message = "Tanggal tidak boleh kosong")
	@Column(name = "Tanggal", nullable = false)
	@Caption(value = "Tanggal")
	private Date tanggal;

	@NotNull(message = "Jam awal tidak boleh kosong")
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "JamAwal", nullable = false)
	@Caption(value = "Jam Awal")
	private Date jamAwal;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "JamAkhir", nullable = true)
	@Caption(value = "Jam Akhir")
	private Date jamAkhir;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectHariFk")
	@Caption(value = "Object Hari")
	private Hari hari;

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

	@ManyToOne
	@JoinColumn(name = "ObjectKamarFk")
	@Caption(value = "Object Kamar")
	private Kamar kamar;

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

	@ManyToOne
	@JoinColumn(name = "ObjectPegawaiFk")
	@Caption(value = "Object Pegawai")
	private Pegawai pegawai;

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

	@ManyToOne
	@JoinColumn(name = "ObjectPegawaiGantiFk")
	@Caption(value = "Object Pegawai Ganti")
	private Pegawai pegawaiGanti;

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

	@ManyToOne
	@JoinColumn(name = "ObjectRuanganFk")
	@Caption(value = "Object Ruangan")
	private Ruangan ruangan;

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

	@ManyToOne
	@JoinColumn(name = "ObjectStatusPegawaiJadwalKerjaFk")
	@Caption(value="Object Status Pegawai Jadwal Kerja")
	private StatusPegawaiJadwalKerja statusPegawaiJadwalKerja;

	@Column(name = "ObjectStatusPegawaiJadwalKerjaFk", insertable=false, updatable=false, nullable=true)
	private Integer statusPegawaiJadwalKerjaId;
	
	@ManyToOne
	@JoinColumn(name = "ObjectStatusAbsensiFk")
	@Caption(value = "Object Status Absensi")
	private StatusAbsensi statusAbsensi;

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

	@Column(name = "KeteranganAlasan", nullable = true, length = 150)
	@Caption(value = "Keterangan Alasan")
	private String keteranganAlasan;

	@Column(name = "KeteranganLainnya", nullable = true, length = 150)
	@Caption(value = "Keterangan Lainnya")
	private String keteranganLainnya;

	public Date getTanggal() {
		return tanggal;
	}

	public void setTanggal(Date tanggal) {
		this.tanggal = tanggal;
	}

	public Date getJamAwal() {
		return jamAwal;
	}

	public void setJamAwal(Date jamAwal) {
		this.jamAwal = jamAwal;
	}

	public Date getJamAkhir() {
		return jamAkhir;
	}

	public void setJamAkhir(Date jamAkhir) {
		this.jamAkhir = jamAkhir;
	}

	public Hari getHari() {
		return hari;
	}

	public void setHari(Hari hari) {
		this.hari = hari;
	}

	public Integer getHariId() {
		return hariId;
	}

	public void setHariId(Integer hariId) {
		this.hariId = hariId;
	}

	public Kamar getKamar() {
		return kamar;
	}

	public void setKamar(Kamar kamar) {
		this.kamar = kamar;
	}

	public Integer getKamarId() {
		return kamarId;
	}

	public void setKamarId(Integer kamarId) {
		this.kamarId = kamarId;
	}

	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;
	}

	public Pegawai getPegawaiGanti() {
		return pegawaiGanti;
	}

	public void setPegawaiGanti(Pegawai pegawaiGanti) {
		this.pegawaiGanti = pegawaiGanti;
	}

	public Integer getPegawaiGantiId() {
		return pegawaiGantiId;
	}

	public void setPegawaiGantiId(Integer pegawaiGantiId) {
		this.pegawaiGantiId = pegawaiGantiId;
	}

	public Ruangan getRuangan() {
		return ruangan;
	}

	public void setRuangan(Ruangan ruangan) {
		this.ruangan = ruangan;
	}

	public Integer getRuanganId() {
		return ruanganId;
	}

	public void setRuanganId(Integer ruanganId) {
		this.ruanganId = ruanganId;
	}

	public StatusPegawaiJadwalKerja getStatusPegawaiJadwalKerja() {
		return statusPegawaiJadwalKerja;
	}

	public void setStatusPegawaiJadwalKerja(StatusPegawaiJadwalKerja statusPegawaiJadwalKerja) {
		this.statusPegawaiJadwalKerja = statusPegawaiJadwalKerja;
	}

	public Integer getStatusPegawaiJadwalKerjaId() {
		return statusPegawaiJadwalKerjaId;
	}

	public void setStatusPegawaiJadwalKerjaId(Integer statusPegawaiJadwalKerjaId) {
		this.statusPegawaiJadwalKerjaId = statusPegawaiJadwalKerjaId;
	}

	public StatusAbsensi getStatusAbsensi() {
		return statusAbsensi;
	}

	public void setStatusAbsensi(StatusAbsensi statusAbsensi) {
		this.statusAbsensi = statusAbsensi;
	}

	public Integer getStatusAbsensiId() {
		return statusAbsensiId;
	}

	public void setStatusAbsensiId(Integer statusAbsensiId) {
		this.statusAbsensiId = statusAbsensiId;
	}

	public String getKeteranganAlasan() {
		return keteranganAlasan;
	}

	public void setKeteranganAlasan(String keteranganAlasan) {
		this.keteranganAlasan = keteranganAlasan;
	}

	public String getKeteranganLainnya() {
		return keteranganLainnya;
	}

	public void setKeteranganLainnya(String keteranganLainnya) {
		this.keteranganLainnya = keteranganLainnya;
	}

	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "public.pegawaijadwalkerjadokterd_m_id_seq")
	@javax.persistence.SequenceGenerator(name = "public.pegawaijadwalkerjadokterd_m_id_seq", sequenceName = "public.pegawaijadwalkerjadokterd_m_id_seq", allocationSize = 1)
	@Column(name = "id")
	protected Integer id;

	public Integer getId() {

		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}
}