package com.jasamedika.medifirst2000.entities;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.jasamedika.medifirst2000.base.BaseMaster;
import com.jasamedika.medifirst2000.helper.Caption;

/**
 *  class ProgramPendidikan
 * 
 * @author Lukman Hakim
 */
@Entity
@Table(name = "tenagapengajar_m")
public class TenagaPengajar  extends BaseMaster{
	
	@Column(name = "unit_kerja", nullable = true , length = 100)
	 @Caption(value = "Unit Kerja")
	private String unitKerja ;
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "pegawaiFk")
	@Caption(value = "Pegawai Tenaga pengajar")
	private Pegawai pegawai; 
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "jurusanPeminatanFk")
	@Caption(value = "Jurusan Peminatan")
	private JurusanPeminatan jurusanPeminatan; 

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

	public Integer getId() {
		return id;
	}

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

	public String getUnitKerja() {
		return unitKerja;
	}

	public void setUnitKerja(String unitKerja) {
		this.unitKerja = unitKerja;
	}

	public Pegawai getPegawai() {
		return pegawai;
	}

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

	public JurusanPeminatan getJurusanPeminatan() {
		return jurusanPeminatan;
	}

	public void setJurusanPeminatan(JurusanPeminatan jurusanPeminatan) {
		this.jurusanPeminatan = jurusanPeminatan;
	}
	
	
}