package com.jasamedika.medifirst2000.entities;

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;

@Getter
@Setter
@Entity
@Table(name = "DataGeneralCheckUp_T")
public class DataGeneralCheckUp extends BaseTransaction {

	@ManyToOne
	@JoinColumn(name = "ObjectGeneralCheckUpFk")
	@NotNull(message = "GeneralCheckUp tidak boleh kosong")
	@Caption(value = "GeneralCheckUp")
	private GeneralCheckUp generalCheckUp;

	@Column(name = "ObjectDokterPemeriksaFk", insertable = false, updatable = false, nullable = false)
	private Integer generalCheckUpId;

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

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

	@ManyToOne
	@JoinColumn(name = "ObjectDokterPemeriksaFk")
	@NotNull(message = "Dokter Pemeriksa tidak boleh kosong")
	@Caption(value = "Dokter Pemeriksa")
	private Pegawai dokterPemeriksa;

	@Column(name = "ObjectDokterPemeriksaFk", insertable = false, updatable = false)
	private Integer dokterPemeriksaId;

}
