package com.jasamedika.medifirst2000.entities;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.jasamedika.medifirst2000.base.BaseMaster;

@Entity
@Table(name = "NotifikasiMessageObjekModul_S")
@JsonSerialize
@JsonIgnoreProperties({ "hibernateLazyInitializer", "handler" })
public class NotifikasiMessageObjekModul extends BaseMaster {

	/**
	 * 
	 */
	private static final long serialVersionUID = -8108786967496072913L;
	
	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "public.notifikasi_message_objek_modul_s_id_seq")
	@javax.persistence.SequenceGenerator(
			name = "public.notifikasi_message_objek_modul_s_id_seq", 
			sequenceName = "public.notifikasi_message_objek_modul_s_id_seq", 
			allocationSize = 1
	)
	@Column(name = "id")
	private Integer id;
	
	@Column(name = "TitleNotifikasi")
	private String titleNotifikasi;
	
	@Column(name = "PesanNotifikasi")
	private String pesanNotifikasi;
	
	@Column(name = "CustomURLObjekModul")
	private String customURLObjekModul;
	
	@Column(name = "NamaFungsiFrontEnd")
	private String namaFungsiFrontEnd;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}
	
	public String getTitleNotifikasi() {
		return titleNotifikasi;
	}

	public void setTitleNotifikasi(String titleNotifikasi) {
		this.titleNotifikasi = titleNotifikasi;
	}

	
	public String getPesanNotifikasi() {
		return pesanNotifikasi;
	}

	public void setPesanNotifikasi(String pesanNotifikasi) {
		this.pesanNotifikasi = pesanNotifikasi;
	}
	
	public String getCustomURLObjekModul() {
		return customURLObjekModul;
	}

	public void setCustomURLObjekModul(String customURLObjekModul) {
		this.customURLObjekModul = customURLObjekModul;
	}
	
	public String getNamaFungsiFrontEnd() {
		return namaFungsiFrontEnd;
	}

	public void setNamaFungsiFrontEnd(String namaFungsiFrontEnd) {
		this.namaFungsiFrontEnd = namaFungsiFrontEnd;
	}
	

	/////////////////////
	/// Foreign Keys
	//////////////////






	@Column(name = "NotifMessagingId")
	private Integer notifMessagingId;
	
	
	public Integer getNotifMessagingId() {
		return notifMessagingId;
	}

	public void setNotifMessagingId(Integer notifMessagingId) {
		this.notifMessagingId = notifMessagingId;
	}
	
	@Column(name = "ObjekModulAplikasiId")
	private Integer objekModulAplikasiId;

	public Integer getObjekModulAplikasiId() {
		return objekModulAplikasiId;
	}

	public void setObjekModulAplikasiId(Integer objekModulAplikasiId) {
		this.objekModulAplikasiId = objekModulAplikasiId;
	}

	@Column(name = "ModulAplikasiId")
	private Integer modulAplikasiId;
	
	public Integer getModulAplikasiId() {
		return modulAplikasiId;
	}

	public void setModulAplikasiId(Integer modulAplikasiId) {
		this.modulAplikasiId = modulAplikasiId;
	}

	@Column(name = "RuanganId")
	private Integer ruanganId;

	public Integer getRuanganId() {
		return ruanganId;
	}

	public void setRuanganId(Integer ruanganId) {
		this.ruanganId = ruanganId;
	}

	
	@ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL)
	@JoinColumn(name = "notifMessagingId", insertable = false, updatable = false)
	@JsonIgnore
	private NotifMessaging notifMessaging;

	public NotifMessaging getNotifMessaging() {
		return notifMessaging;
	}

	public void setNotifMessaging(NotifMessaging notifMessaging) {
		this.notifMessaging = notifMessaging;
	}
		
	@ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL)
	@JoinColumn(name = "ruanganId", insertable = false, updatable = false)
	private Ruangan ruangan;

	public Ruangan getRuangan() {
		return ruangan;
	}

	public void setRuangan(Ruangan ruangan) {
		this.ruangan = ruangan;
	}
	
	@ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL)
	@JoinColumn(name = "modulAplikasiId", insertable = false, updatable = false)
	private ModulAplikasi modulAplikasi;

	public ModulAplikasi getModulAplikasi() {
		return modulAplikasi;
	}

	public void setModulAplikasi(ModulAplikasi modulAplikasi) {
		this.modulAplikasi = modulAplikasi;
	}
	
	@ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL)
	@JoinColumn(name = "objekModulAplikasiId", insertable = false, updatable = false)
	private ObjekModulAplikasi objekModulAplikasi;

	public ObjekModulAplikasi getObjekModulAplikasi() {
		return objekModulAplikasi;
	}

	public void setObjekModulAplikasi(ObjekModulAplikasi objekModulAplikasi) {
		this.objekModulAplikasi = objekModulAplikasi;
	}
	
	

}
