package com.jasamedika.medifirst2000.entities;

import java.io.Serializable;
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 MapJenisPetugasPToJenisPegawai
 * 
 * @author Generator
 */
@Entity // @Audited
@Table(name = "MapJenisPetugasPToJenisPegawai_M")
public class MapJenisPetugasPToJenisPegawai extends BaseMaster {
	@ManyToOne
	@JoinColumn(name = "ObjectJenisPegawaiFk")
	@NotNull(message = "Kd Jenis Pegawai tidak boleh kosong")

	@Caption(value = "Object Jenis Pegawai")
	private JenisPegawai jenisPegawai;

	public void setJenisPegawai(JenisPegawai jenisPegawai) {
		this.jenisPegawai = jenisPegawai;
	}

	public JenisPegawai getJenisPegawai() {
		return this.jenisPegawai;
	}

	@Column(name = "ObjectJenisPegawaiFk", insertable = false, updatable = false)
	private Integer jenisPegawaiId;

	@ManyToOne
	@JoinColumn(name = "ObjectJenisPetugasPeFk")
	@NotNull(message = "Kd Jenis Petugas Pe tidak boleh kosong")

	@Caption(value = "Object Jenis Petugas Pe")
	private JenisPetugasPelaksana jenisPetugasPe;

	public void setJenisPetugasPe(JenisPetugasPelaksana jenisPetugasPe) {
		this.jenisPetugasPe = jenisPetugasPe;
	}

	public JenisPetugasPelaksana getJenisPetugasPe() {
		return this.jenisPetugasPe;
	}

	@Column(name = "ObjectJenisPetugasPeFk", insertable = false, updatable = false, nullable = false)
	private Integer jenisPetugasPeId;

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

	public Integer getId() {

		return id;
	}

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