package com.jasamedika.medifirst2000.entities;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.jasamedika.medifirst2000.base.BaseMaster;
import com.jasamedika.medifirst2000.helper.Caption;

@Entity // @Audited
@Table(name = "JadwalPraktikDokter_M")
@JsonIgnoreProperties({ "hibernateLazyInitializer", "handler" })
public class JadwalPraktikDokter extends BaseMaster {

	@ManyToOne
	@JoinColumn(name = "ObjectJadwalPraktekFk")
	@NotNull(message = "Kd Jadwal Praktek tidak boleh kosong")
	@Caption(value = "Object JadwalPraktek")
	private JadwalPraktek jadwalPraktek;

	@Column(name = "ObjectJadwalPraktekFk", insertable = false, updatable = false, nullable = false)
	private Integer jadwalPraktekId;

	@ManyToOne
	@JoinColumn(name = "ObjectRuanganFk")
	@NotNull(message = "Kd ruangan tidak boleh kosong")
	@Caption(value = "Object Ruangan")
	private Ruangan ruangan;

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

	@ManyToOne
	@JoinColumn(name = "ObjectPegawaiFk")
	@NotNull(message = "Kd pegawai tidak boleh kosong")
	@Caption(value = "Object Pegawai")
	private Pegawai dokter;

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

	@ManyToOne
	@JoinColumn(name = "ObjectHariFk")
	@NotNull(message = "Kd hari tidak boleh kosong")
	@Caption(value = "Object hari")
	private Hari hari;

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

	@Column(name = "Quota", nullable = true)
	@Caption(value = "Quota")
	private Integer quota;

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

	public Integer getJadwalPraktekId() {
		return jadwalPraktekId;
	}

	public void setJadwalPraktekId(Integer jadwalPraktekId) {
		this.jadwalPraktekId = jadwalPraktekId;
	}

	public Integer getRuanganId() {
		return ruanganId;
	}

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

	public Integer getDokterId() {
		return dokterId;
	}

	public void setDokterId(Integer dokterId) {
		this.dokterId = dokterId;
	}

	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 Integer getId() {
		return id;
	}

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

	public JadwalPraktek getJadwalPraktek() {
		return jadwalPraktek;
	}

	public void setJadwalPraktek(JadwalPraktek jadwalPraktek) {
		this.jadwalPraktek = jadwalPraktek;
	}

	public Ruangan getRuangan() {
		return ruangan;
	}

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

	public Pegawai getDokter() {
		return dokter;
	}

	public void setDokter(Pegawai dokter) {
		this.dokter = dokter;
	}

	public Integer getQuota() {
		return quota;
	}

	public void setQuota(Integer quota) {
		this.quota = quota;
	}

}