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 static javax.persistence.FetchType.LAZY;

@Getter
@Setter
@Entity
@Table(name = "DiputuskanDetail_T")
public class DiputuskanDetail extends BaseTransaction {

	@ManyToOne(fetch = LAZY)
	@JoinColumn(name = "Diputuskan")
	@Caption(value = "Pasien Daftar")
	@JsonBackReference
	private Diputuskan Diputuskan;

	@Column(name = "Diputuskan", insertable = false, updatable = false)
	private Integer DiputuskanId;

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

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

}
