42 lines
1.3 KiB
Java
42 lines
1.3 KiB
Java
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.FetchType.LAZY;
|
|
import static javax.persistence.GenerationType.SEQUENCE;
|
|
|
|
@Getter
|
|
@Setter
|
|
@Entity
|
|
@Table(name = "MappingPegawaiToJabatanManajerial_M")
|
|
public class MappingPegawaiToJabatanManajerial extends BaseMaster {
|
|
|
|
@ManyToOne(fetch = LAZY)
|
|
@JoinColumn(name = "ObjectPegawaiFk")
|
|
@Caption(value = "Object Pegawai")
|
|
private Pegawai pegawai;
|
|
|
|
@Column(name = "ObjectPegawaiFk", insertable = false, updatable = false, nullable = false)
|
|
private Integer pegawaiId;
|
|
|
|
@ManyToOne(fetch = LAZY)
|
|
@JoinColumn(name = "ObjectJabatanFk")
|
|
@Caption(value = "Object Jabatan")
|
|
private Jabatan jabatan;
|
|
|
|
@Column(name = "ObjectJabatanFk", insertable = false, updatable = false, nullable = false)
|
|
private Integer jabatanId;
|
|
|
|
@Id
|
|
@GeneratedValue(strategy = SEQUENCE, generator = "public.MappingPegawaiToJabatanManajerial_m_id_seq")
|
|
@SequenceGenerator(name = "public.MappingPegawaiToJabatanManajerial_m_id_seq", sequenceName = "public.MappingPegawaiToJabatanManajerial_m_id_seq", allocationSize = 1)
|
|
@Column(name = "id")
|
|
protected Integer id;
|
|
|
|
}
|