package com.jasamedika.medifirst2000.entities;

import com.fasterxml.jackson.annotation.JsonBackReference;
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 javax.validation.constraints.NotNull;

/**
 * class Agama
 * 
 * @author Generator
 */
@Getter
@Setter
@Entity
@Table(name = "DetailInformasiMedis_T")
@JsonIgnoreProperties({ "hibernateLazyInitializer", "handler" })
public class DetailInformasiMedis extends BaseTransaction {

	@ManyToOne
	@JoinColumn(name = "objectTransferPasienExsternalFk")
	@Caption(value = "Transfer Pasien Exsternal")
	@JsonBackReference
	private TransferPasienExsternal transferPasienExsternal;

	@Column(name = "objectTransferPasienExsternalFk", insertable = false, updatable = false)
	private String transferPasienExsternalId;

	@ManyToOne
	@JoinColumn(name = "objectInformasiMedisFk")
	@Caption(value = "InformasiMedis Pasien")
	@JsonBackReference
	@NotNull(message = "InformasiMedis Harus Diisi")
	private InformasiMedis informasiMedis;

	@Column(name = "objectInformasiMedisFk", insertable = false, updatable = false, nullable = false)
	private Integer informasiMedisId;

	@Column(name = "checked")
	private Boolean checked;

}
