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 static javax.persistence.GenerationType.SEQUENCE;

/**
 * class DiklatJurusan
 * 
 * @author Generator
 */
@Getter
@Setter
@Entity
@Table(name = "MapDiklatProgramToDiklatJurusan_M")
public class MapDiklatProgramToDiklatJurusan extends BaseMaster {

	@ManyToOne
	@JoinColumn(name = "diklatProgramFk")
	@Caption(value = "diklatProgram")
	private DiklatProgram diklatProgram;

	@Column(name = "diklatProgramFk", insertable = false, updatable = false, nullable = false)
	private Integer diklatProgramId;

	@ManyToOne
	@JoinColumn(name = "diklatJurusanFk")
	@Caption(value = "diklatJurusan")
	private DiklatJurusan diklatJurusan;

	@Column(name = "diklatJurusanFk", insertable = false, updatable = false, nullable = false)
	private Integer diklatJurusanId;

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

}