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 java.util.Date;

import static javax.persistence.FetchType.LAZY;

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

	@ManyToOne(fetch = LAZY)
	@JoinColumn(name = "ObjectPasienDaftarFk")
	@Caption(value = "Object Pasien Daftar")
	private PasienDaftar pasienDaftar;

	@Column(name = "ObjectPasienDaftarFk", insertable = false, updatable = false)
	private String pasienDaftarId;

	@ManyToOne(fetch = LAZY)
	@JoinColumn(name = "ObjectJadwalDpjpFk")
	@Caption(value = "Object Jadwal Dpjp")
	private JadwalDpjpRawatInap jadwalDpjp;

	@Column(name = "ObjectJadwalDpjpFk", insertable = false, updatable = false)
	private String jadwalDpjpId;

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

}
