package com.jasamedika.medifirst2000.entities;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.jasamedika.medifirst2000.base.BaseMaster;
import com.jasamedika.medifirst2000.helper.Caption;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

@Entity
@Table(name = "IpsrsTeknisiKontakService_M")
@JsonIgnoreProperties({ "hibernateLazyInitializer", "handler" })
public class IpsrsTeknisiKontakService extends BaseMaster {

	@ManyToOne(fetch = FetchType.LAZY)
	@Caption(value = "Ipsrs Kontak Service")
	@JoinColumn(name = "ObjectIpsrsKontakServiceFk")
	private IpsrsKontakService ipsrsKontakService;

	@Column(name = "ObjectIpsrsKontakServiceFk", columnDefinition = "CHAR(32)", nullable = true, insertable = false, updatable = false)
	private String ipsrsKontakServiceId;

	@ManyToOne(fetch = FetchType.LAZY)
	@Caption(value = "Nama Teknisi/Teknisi Pendamping")
	@JoinColumn(name = "ObjectTeknisiFk")
	private Pegawai teknisi;

	@Column(name = "ObjectTeknisiFk", nullable = true, insertable = false, updatable = false)
	private Integer teknisiId;

	public IpsrsKontakService getIpsrsKontakService() {
		return ipsrsKontakService;
	}

	public void setIpsrsKontakService(IpsrsKontakService ipsrsKontakService) {
		this.ipsrsKontakService = ipsrsKontakService;
	}

	public String getIpsrsKontakServiceId() {
		return ipsrsKontakServiceId;
	}

	public void setIpsrsKontakServiceId(String ipsrsKontakServiceId) {
		this.ipsrsKontakServiceId = ipsrsKontakServiceId;
	}

	public Pegawai getTeknisi() {
		return teknisi;
	}

	public void setTeknisi(Pegawai teknisi) {
		this.teknisi = teknisi;
	}

	public Integer getTeknisiId() {
		return teknisiId;
	}

	public void setTeknisiId(Integer teknisiId) {
		this.teknisiId = teknisiId;
	}

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

	public Integer getId() {

		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}
}