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;

/**
 * class HasilPemeriksaan
 * 
 * @author Generator
 */
@Getter
@Setter
@Entity
@Table(name = "HasilPemeriksaanDuplo_T")
public class HasilPemeriksaanDuplo extends BaseTransaction {

	@ManyToOne
	@JoinColumn(name = "HasilPemeriksaanFk")
	@NotNull(message = "Hasil Pemeriksaan Harus Diisi")
	@Caption(value = "HasilPemeriksaan")
	private HasilPemeriksaan hasilPemeriksaan;

	@Column(name = "HasilPemeriksaanFk", columnDefinition = "CHAR(32)", insertable = false, updatable = false)
	private String hasilPemeriksaanId;

	@ManyToOne
	@JoinColumn(name = "ProdukFk")
	@NotNull(message = "Produk Harus Diisi")
	@Caption(value = "Produk")
	private Produk produk;

	@Column(name = "ProdukFk", insertable = false, updatable = false)
	private Integer produkId;

	@ManyToOne
	@JoinColumn(name = "StrukHasilFk")
	@NotNull(message = "Struk Hasil Harus Diisi")
	@Caption(value = "Struk Hasil")
	private StrukHasilPemeriksaan strukHasilPemeriksaan;

	@Column(name = "StrukHasilFk", columnDefinition = "CHAR(32)", insertable = false, updatable = false)
	private String strukHasilPemeriksaanId;

	@ManyToOne
	@JoinColumn(name = "DetailFk")
	@Caption(value = "Detail")
	private ProdukDetailLaboratorium detail;

	@Column(name = "DetailFk", insertable = false, updatable = false)
	private Integer detailId;

	@Column(name = "TglInput", nullable = false, length = 100)
	@Caption(value = "TglInput")
	private Date tglInput;

	@Column(name = "Hasil", nullable = false, length = 100)
	@Caption(value = "Hasil")
	private String hasil;

}