package com.jasamedika.medifirst2000.entities;

import com.jasamedika.medifirst2000.helper.Caption;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;
import java.util.Date;

import static javax.persistence.FetchType.LAZY;

@Getter
@Setter
@Entity
@Table(name = "DiagnosaKeperawatan_T")
public class DiagnosaKeperawatanTransaksi extends MedicalRecordTransaction {

	@ManyToOne(fetch = LAZY)
	@JoinColumn(name = "ObjectDiagnosaKeperawatan")
	@Caption(value = "DiagnosaKeperawatan")
	private DiagnosaKeperawatan diagnosaKeperawatan;

	@Column(name = "ObjectDiagnosaKeperawatan", insertable = false, updatable = false)
	private Integer diagnosaKeperawatanId;

	@ManyToOne(fetch = LAZY)
	@JoinColumn(name = "ObjectImplementasi")
	@Caption(value = "Implementasi")
	private Implementasi implementasi;

	@Column(name = "ObjectImplementasi", insertable = false, updatable = false)
	private Integer implementasiId;

	@ManyToOne(fetch = LAZY)
	@JoinColumn(name = "ObjectIntervensi")
	@Caption(value = "Intervensi")
	private Intervensi intervensi;

	@Column(name = "ObjectIntervensi", insertable = false, updatable = false)
	private Integer ObjectIntervensiId;

	@ManyToOne(fetch = LAZY)
	@JoinColumn(name = "ObjectEvaluasi")
	@Caption(value = "Evaluasi")
	private Evaluasi evaluasi;

	@Column(name = "ObjectEvaluasi", insertable = false, updatable = false)
	private Integer ObjectEvaluasiId;

	@Caption(value = "tglDitemukan")
	@Column(name = "tglDitemukan")
	private Date tglDitemukan;

	@Caption(value = "tglTeratasi")
	@Column(name = "tglTeratasi")
	private Date tglTeratasi;

	@Caption(value = "tglInput")
	@Column(name = "tglInput")
	private Date tglInput;

	@ManyToOne(fetch = LAZY)
	@JoinColumn(name = "ObjectPegawai")
	@Caption(value = "Pegawai")
	private Pegawai pegawai;

	@Column(name = "ObjectPegawai", insertable = false, updatable = false)
	private Integer pegawaiId;

	@ManyToOne(fetch = LAZY)
	@JoinColumn(name = "ObjectRuangan")
	@Caption(value = "Ruangan")
	private Ruangan ruangan;

	@Column(name = "ObjectRuangan", insertable = false, updatable = false)
	private Integer ruanganId;

}
