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 MapPegawaiLaboratRadiologi
 * 
 * @author Generator
 */
@Getter
@Setter
@Entity
@Table(name = "MapPegawaiLaboratRadiologi_M")
public class MapPegawaiLaboratRadiologi extends BaseMaster {

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

	@ManyToOne
	@JoinColumn(name = "PegawaiFk")
	@NotNull(message = "Pegawai Harus Diisi")
	@Caption(value = "Pegawai")
	private Pegawai pegawai;

	@Column(name = "PegawaiFk", insertable = false, updatable = false)
	private Integer pegawaiId;

}