package com.jasamedika.medifirst2000.entities;

import java.io.Serializable;
import java.util.Date;

import org.hibernate.envers.Audited;
import javax.persistence.*;

import org.hibernate.validator.constraints.NotEmpty;

import com.jasamedika.medifirst2000.base.BaseMaster;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.internal.util.logging.Messages;

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

/**
 * class MapAsKepIntervensiToProduk
 * 
 * @author Generator
 */
@Entity // @Audited
@Table(name = "MapJabatanToUraianTugas_M")
public class MapJabatanToUraianTugas extends BaseMaster {

	@Column(name = "NoDokumen", nullable = true, length = 100)
	@Caption(value = "NoDokumen")
	private String noDokumen;

	@Column(name = "NoRevisi", nullable = true, length = 100)
	@Caption(value = "NoRevisi")
	private String noRevisi;

	@Column(name = "TglTerbit", nullable = true, length = 100)
	@Caption(value = "TglTerbit")
	private Date tglTerbit;

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

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

	@ManyToOne
	@JoinColumn(name = "ObjectJabatanFk")
	@Caption(value = "ObjectJabatanFk")
	private Jabatan jabatan;

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

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

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

	public String getNoDokumen() {
		return noDokumen;
	}

	public void setNoDokumen(String noDokumen) {
		this.noDokumen = noDokumen;
	}

	public String getNoRevisi() {
		return noRevisi;
	}

	public void setNoRevisi(String noRevisi) {
		this.noRevisi = noRevisi;
	}

	public Date getTglTerbit() {
		return tglTerbit;
	}

	public void setTglTerbit(Date tglTerbit) {
		this.tglTerbit = tglTerbit;
	}

	public Pegawai getPegawai() {
		return pegawai;
	}

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

	public Jabatan getJabatan() {
		return jabatan;
	}

	public void setJabatan(Jabatan jabatan) {
		this.jabatan = jabatan;
	}

	public Ruangan getRuangan() {
		return ruangan;
	}

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

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

	public Integer getId() {

		return id;
	}

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