package com.jasamedika.medifirst2000.entities;

import javax.persistence.Column;
import javax.persistence.Entity;
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;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

/**
 * class MapPasienToJabatan
 * 
 * @author Generator
 */
@Entity // @Audited
@Table(name = "MapPelatihanPaketToJabatan_M")
@JsonIgnoreProperties({ "hibernateLazyInitializer", "handler" })
public class MapPelatihanPaketToJabatan extends BaseMaster {
	@ManyToOne
	@JoinColumn(name = "ObjectPeatihanFk")
	@NotNull(message = "Paket Tidak Boleh Kosong")
	private PelatihanPaket pelatihanPaket;

	@Column(name = "ObjectPeatihanFk", columnDefinition = "CHAR(32)", insertable = false, updatable = false)
	private String pelatihanPaketId;

	@ManyToOne
	@JoinColumn(name = "ObjectJabatanFk")
	@NotNull(message = "Kd Jabatan tidak boleh kosong")

	@Caption(value = "Object Jabatan")
	private Jabatan jabatan;

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

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

	public PelatihanPaket getPelatihanPaket() {
		return pelatihanPaket;
	}

	public void setPelatihanPaket(PelatihanPaket pelatihanPaket) {
		this.pelatihanPaket = pelatihanPaket;
	}

	public String getPelatihanPaketId() {
		return pelatihanPaketId;
	}

	public void setPelatihanPaketId(String pelatihanPaketId) {
		this.pelatihanPaketId = pelatihanPaketId;
	}

	public Jabatan getJabatan() {
		return jabatan;
	}

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

	public Integer getJabatanId() {
		return jabatanId;
	}

	public void setJabatanId(Integer jabatanId) {
		this.jabatanId = jabatanId;
	}

	public Integer getId() {
		return id;
	}

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

	
	
}