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 = "DataPapSmear_T")
public class DataPapSmear extends BaseTransaction {

	@ManyToOne
	@JoinColumn(name = "ObjectPapSmearFk")
	@NotNull(message = "PapSmear tidak boleh kosong")
	@Caption(value = "PapSmear")
	public PapSmear papSmear;

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

	@Caption(value = "noPemeriksaan")
	@Column(name = "noPemeriksaan")
	private Integer noPemeriksaan;

	@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;

}
