package com.jasamedika.medifirst2000.entities;

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

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.util.Date;

import static javax.persistence.FetchType.LAZY;

/**
 * class PosisiRahim
 * 
 * @author Generator
 */
@Getter
@Setter
@Entity
@Table(name = "DetailDokterOperasi_T")
public class DetailDokterOperasi extends BaseTransaction {

	@ManyToOne(fetch = LAZY)
	@JoinColumn(name = "ObjectPenghitunganKassaDanAlatOperasiFk")
	@NotNull(message = "Produk Harus Diisi")
	@Caption(value = "Penghitungan Kassa Dan Alat Operasi")
	@JsonBackReference
	private PenghitunganKassaDanAlatOperasi penghitunganKassaDanAlatOperasi;

	@Column(name = "ObjectPenghitunganKassaDanAlatOperasiFk", insertable = false, updatable = false, nullable = false)
	private String penghitunganKassaDanAlatOperasiId;

	@ManyToOne(fetch = LAZY)
	@JoinColumn(name = "ObjectProdukFk")
	@Caption(value = "Nama Alat Yang Digunakan")
	private Produk produk;

	@Column(name = "ObjectProdukFk", insertable = false, updatable = false)
	private Integer produkId;

	@ManyToOne(fetch = LAZY)
	@JoinColumn(name = "ObjectkAhliBedahFk")
	@NotNull(message = "Ahli Bedah Harus Diisi")
	@Caption(value = "Ahli Bedah")
	private Pegawai ahliBedah;

	@Column(name = "ObjectkAhliBedahFk", insertable = false, updatable = false, nullable = false)
	private Integer ahliBedahId;

	@ManyToOne(fetch = LAZY)
	@JoinColumn(name = "ObjectkAsistenFk")
	@NotNull(message = "Asisten Harus Diisi")
	@Caption(value = "Asisten")
	private Pegawai asisten;

	@Column(name = "ObjectkAsistenFk", insertable = false, updatable = false, nullable = false)
	private Integer asistenId;

	@ManyToOne(fetch = LAZY)
	@JoinColumn(name = "ObjectkPerawatInstrumenFk")
	@NotNull(message = "Perawat Instrumen Harus Diisi")
	@Caption(value = "Perawat Instrumen")
	private Pegawai perawatInstrumen;

	@Column(name = "ObjectkPerawatInstrumenFk", insertable = false, updatable = false, nullable = false)
	private Integer perawatInstrumenId;

	@ManyToOne(fetch = LAZY)
	@JoinColumn(name = "ObjectkPerawatSekulerFk")
	@NotNull(message = "Perawat Sekuler Harus Diisi")
	@Caption(value = "Perawat Sekuler")
	private Pegawai perawatSekuler;

	@Column(name = "ObjectkPerawatSekulerFk", insertable = false, updatable = false, nullable = false)
	private Integer perawatSekulerId;

	@Column(name = "kondisiSterilisasi")
	private String kondisiSterilisasi;

	@Column(name = "load")
	private String load;

	@ManyToOne(fetch = LAZY)
	@JoinColumn(name = "ObjectkPerawatSirkulerFk")
	@NotNull(message = "Perawat Sirkuler Diisi")
	@Caption(value = "Perawat Sirkuler")
	private Pegawai perawatSirkuler;

	@Column(name = "ObjectkPerawatSirkulerFk", insertable = false, updatable = false, nullable = false)
	private Integer Id;

	@Column(name = "tanggalSteril")
	private Date tanggalSteril;

	@Column(name = "alat")
	private String alat;

}
