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 = "MapObjekModulToLoginUser_S")
public class MapObjekModulToLoginUser extends BaseMaster {

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

	@ManyToOne(fetch = LAZY)
	@JoinColumn(name = "ObjectLoginUserFk")
	@Caption(value = "Object Login User")
	private LoginUser loginUser;

	@Column(name = "ObjectLoginUserFk", insertable = false, updatable = false)
	private Integer loginUserId;

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

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

	@Caption(value = "Simpan")
	@Column(name = "simpan")
	private Boolean simpan;

	@Caption(value = "Hapus")
	@Column(name = "hapus")
	private Boolean hapus;

	@Caption(value = "Edit")
	@Column(name = "edit")
	private Boolean edit;

	@Caption(value = "Cetak")
	@Column(name = "cetak")
	private Boolean cetak;

}
