package com.jasamedika.medifirst2000.entities;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import com.fasterxml.jackson.annotation.JsonManagedReference;
import com.jasamedika.medifirst2000.base.BaseMaster;
import com.jasamedika.medifirst2000.helper.Caption;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

@Entity
@Table(name = "JadwalRencanaPemeriksaan_M")
public class JadwalRencanaPemeriksaan extends BaseMaster {

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

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

	@Column(name = "pemeriksaan")
	@Caption(value = "Pemeriksaan")
	private String pemeriksaan;

	@Column(name = "tglPemeriksaan")
	@Caption(value = "Tanggal Pemeriksaan")
	private Date tglPemeriksaan;

	public JadwalRencanaPemeriksaan() {
		super();
	}

	public JadwalRencanaPemeriksaan(Integer id, Integer pegawaiId, String pemeriksaan, Date tglPemeriksaan) {
		super();
		this.id = id;
		this.pegawaiId = pegawaiId;
		this.pemeriksaan = pemeriksaan;
		this.tglPemeriksaan = tglPemeriksaan;
	}

	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 String getPemeriksaan() {
		return pemeriksaan;
	}

	public void setPemeriksaan(String pemeriksaan) {
		this.pemeriksaan = pemeriksaan;
	}

	public Date getTglPemeriksaan() {
		return tglPemeriksaan;
	}

	public void setTglPemeriksaan(Date tglPemeriksaan) {
		this.tglPemeriksaan = tglPemeriksaan;
	}

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

	public Integer getId() {

		return id;
	}

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