package com.jasamedika.medifirst2000.entities;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;

import com.fasterxml.jackson.annotation.JsonBackReference;
import com.jasamedika.medifirst2000.base.BaseTransaction;
import com.jasamedika.medifirst2000.helper.Caption;

@Entity
@Table(name = "HasilPemeriksaanSwaDetail_T")
public class HasilPemeriksaanSwaDetail extends BaseTransaction {
	
	public HasilPemeriksaanSwaDetail() {
		super();
	}
	
	public HasilPemeriksaanSwaDetail(Double nilai) {
		super();
		this.nilai = nilai;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectHasilPemeriksaanLimbahFk")
	@NotNull(message = "Hasil Pemeriksaan Limbah Cair harus diisi") 
	@Caption(value="Hasil Pemeriksaan Limbah Cair")
	@JsonBackReference
	private HasilPemeriksaanSwaPantauLimbahCair hasilPemeriksaanSwaPantauLimbahCair;
	
	@Column(name = "ObjectHasilPemeriksaanLimbahFk", columnDefinition = "CHAR(32)", insertable = false, updatable = false, nullable = false)
	private String hasilPemeriksaanSwaPantauLimbahCairId;


	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectParameterFk")
	@NotNull(message = "Parameter tidak boleh kosong") 
	@Caption(value="Object Parameter")
	private Parameter parameter;
	
	@Column(name = "ObjectParameterFk", insertable = false, updatable = false, nullable = false)
	private Integer parameterId;
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectSatuanStandarFk")
	@Caption(value="Satuan")
	private SatuanStandar satuanStandar;
	
	@Column(name = "ObjectSatuanStandarFk", insertable = false, updatable = false, nullable = true)
	private Integer satuanStandarId;
	
	@Column(name = "Nilai")
	@Caption(value="ilai")
	private Double nilai;

	public HasilPemeriksaanSwaPantauLimbahCair getHasilPemeriksaanSwaPantauLimbahCair() {
		return hasilPemeriksaanSwaPantauLimbahCair;
	}

	public void setHasilPemeriksaanSwaPantauLimbahCair(
			HasilPemeriksaanSwaPantauLimbahCair hasilPemeriksaanSwaPantauLimbahCair) {
		this.hasilPemeriksaanSwaPantauLimbahCair = hasilPemeriksaanSwaPantauLimbahCair;
	}

	

	public String getHasilPemeriksaanSwaPantauLimbahCairId() {
		return hasilPemeriksaanSwaPantauLimbahCairId;
	}



	public void setHasilPemeriksaanSwaPantauLimbahCairId(String hasilPemeriksaanSwaPantauLimbahCairId) {
		this.hasilPemeriksaanSwaPantauLimbahCairId = hasilPemeriksaanSwaPantauLimbahCairId;
	}



	public Parameter getParameter() {
		return parameter;
	}

	public void setParameter(Parameter parameter) {
		this.parameter = parameter;
	}

	public Integer getParameterId() {
		return parameterId;
	}

	public void setParameterId(Integer parameterId) {
		this.parameterId = parameterId;
	}

	public SatuanStandar getSatuanStandar() {
		return satuanStandar;
	}

	public void setSatuanStandar(SatuanStandar satuanStandar) {
		this.satuanStandar = satuanStandar;
	}

	public Integer getSatuanStandarId() {
		return satuanStandarId;
	}

	public void setSatuanStandarId(Integer satuanStandarId) {
		this.satuanStandarId = satuanStandarId;
	}

	public Double getNilai() {
		return nilai;
	}

	public void setNilai(Double nilai) {
		this.nilai = nilai;
	}
	
	
}
