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 com.jasamedika.medifirst2000.base.BaseMaster;
import com.jasamedika.medifirst2000.helper.Caption;

@Entity
@Table(name = "PegawaiDokumen_M")
public class PegawaiDokumen extends BaseMaster{
	@ManyToOne
	@JoinColumn(name = "pegawaiFk")
	@Caption(value="pegawaiFk")
	private Pegawai pegawai;

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

	@ManyToOne
	@JoinColumn(name = "dokumenFk")
	@Caption(value="dokumenFk")
	private Dokumen dokumen;

	@Column(name = "dokumenFk", insertable=false,updatable=false,nullable=false)
	private Integer dokumenId;
	
	@Column(name = "keteranganLainnya", nullable = true)
	@Caption(value = "keteranganLainnya")
	private String keteranganLainnya;

	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 Dokumen getDokumen() {
		return dokumen;
	}

	public void setDokumen(Dokumen dokumen) {
		this.dokumen = dokumen;
	}

	public Integer getDokumenId() {
		return dokumenId;
	}

	public void setDokumenId(Integer dokumenId) {
		this.dokumenId = dokumenId;
	}

	public String getKeteranganLainnya() {
		return keteranganLainnya;
	}

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

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

	public Integer getId() {
		return id;
	}

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

}
