package com.jasamedika.medifirst2000.entities;

import com.jasamedika.medifirst2000.base.BaseMaster;
import com.jasamedika.medifirst2000.helper.Caption;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;
import javax.validation.constraints.NotNull;

import static javax.persistence.GenerationType.SEQUENCE;

/**
 * class MapJenisPetugasPToJenisPegawai
 * 
 * @author Generator
 */
@Getter
@Setter
@Entity
@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;

	@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;

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

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

}