package com.jasamedika.medifirst2000.entities;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.jasamedika.medifirst2000.base.BaseTransaction;
import com.jasamedika.medifirst2000.helper.Caption;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;

import static javax.persistence.FetchType.LAZY;

@Getter
@Setter
@Entity
@Table(name = "IpsrsPemeriksaan_T")
@JsonIgnoreProperties({ "hibernateLazyInitializer", "handler" })
public class IpsrsPemeriksaan extends BaseTransaction {

	@ManyToOne(fetch = LAZY)
	@Caption(value = "Preventive Maintenance")
	@JoinColumn(name = "ObjectIpsrsPreventiveMaintenanceFk")
	private IpsrsPreventiveMaintenance ipsrsPreventiveMaintenance;

	@Column(name = "ObjectIpsrsPreventiveMaintenanceFk", columnDefinition = "CHAR(32)", insertable = false, updatable = false)
	private String ipsrsPreventiveMaintenanceId;

	@ManyToOne(fetch = LAZY)
	@Caption(value = "Pengecekan Peralatan Mapping")
	@JoinColumn(name = "ObjectPengecekanPeralatanMappingFk")
	private PengecekanPeralatanMapping pengecekanPeralatanMapping;

	@Column(name = "ObjectPengecekanPeralatanMappingFk", insertable = false, updatable = false)
	private Integer pengecekanPeralatanMappingId;

	@ManyToOne(fetch = LAZY)
	@Caption(value = "Pemeriksaan Fisik")
	@JoinColumn(name = "ObjectPemeriksaanFisikFK")
	private IpsrsPemeriksaanAlat pemeriksaanFisik;

	@Column(name = "ObjectPemeriksaanFisikFK", insertable = false, updatable = false)
	private Integer pemeriksaanFisikId;

	@ManyToOne(fetch = LAZY)
	@Caption(value = "Pemeriksaan Fungsi")
	@JoinColumn(name = "ObjectPemeriksaanFungsiFk")
	private IpsrsPemeriksaanAlat pemeriksaanFungsi;

	@Column(name = "ObjectPemeriksaanFungsiFk", insertable = false, updatable = false)
	private Integer pemeriksaanFungsiId;

}
