package com.jasamedika.medifirst2000.entities;

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

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

@Getter
@Setter
@Entity
@Table(name = "DetailDiagnosaPasien_T")
public class DetailDiagnosaPasien extends MedicalRecordTransaction {

	@ManyToOne
	@JoinColumn(name = "ObjectDiagnosaPasienFk")
	@NotNull(message = "Diagnosa Pasien harus Diisi")
	@Caption(value = "Diagnosa Pasien")
	private DiagnosaPasien diagnosaPasien;

	@Column(name = "ObjectDiagnosaPasienFk", insertable = false, updatable = false, nullable = false)
	private String diagnosaPasienId;

	@ManyToOne
	@JoinColumn(name = "ObjectDiagnosaFk")
	@NotNull(message = "Diagnosa  harus Diisi")
	@Caption(value = "Diagnosa ")
	private Diagnosa diagnosa;

	@Column(name = "ObjectDiagnosaFk", insertable = false, updatable = false, nullable = false)
	private Integer diagnosaId;

	@ManyToOne
	@JoinColumn(name = "ObjectJenisDiagnosaFk")
	@NotNull(message = "Jenis Diagnosa  harus Diisi")
	@Caption(value = "Jenis Diagnosa ")
	private JenisDiagnosa jenisDiagnosa;

	@Column(name = "ObjectDiagnosaFk", insertable = false, updatable = false, nullable = false)
	private Integer jenisDiagnosaId;

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

	@Column(name = "keterangan")
	@Caption(value = "keterangan")
	private String keterangan;

}
