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;

@Getter
@Setter
@Entity
@Table(name = "MapObjekModulToDepartemen_S")
public class MapObjekModulToDepartemen extends BaseMaster {

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

	@ManyToOne
	@JoinColumn(name = "ObjectDepartemenFk")
	@Caption(value = "Object Departemen")
	private Departemen departemen;

	@Column(name = "ObjectDepartemenFk", insertable = false, updatable = false)
	private Integer departemenId;

	@ManyToOne
	@JoinColumn(name = "ObjectObjekModulAplikasiFk")
	@Caption(value = "Object Objek Modul Aplikasi")
	private ObjekModulAplikasi objekModulAplikasi;

	@Column(name = "ObjectObjekModulAplikasiFk", insertable = false, updatable = false)
	private Integer objekModulAplikasiId;

}