package com.jasamedika.medifirst2000.entities;

import java.util.Date;

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

import org.hibernate.annotations.DynamicUpdate;

import com.jasamedika.medifirst2000.base.BaseTransaction;
import com.jasamedika.medifirst2000.helper.Caption;

@Entity
@DynamicUpdate
@Table(name="Bowidick_T")
public class Bowidick extends BaseTransaction{
	@Column(name = "Tanggal", nullable = true)
	@Caption(value = "Tanggal")
	private Date tanggal;
	
	@ManyToOne
	@JoinColumn(name = "ObjectMesinFk")
	@NotNull(message = "Mesin tidak boleh kosong") 
	@Caption(value="Object Mesin")
	private Mesin mesin;
	
	@Column(name = "ObjectMesinFk", insertable = false, updatable = false, nullable = false)
	private Integer mesinId;
	
	@Column(name = "ProgramMesin", nullable = true)
	@Caption(value = "Program Mesin")
	private String programMesin;
	
	@Column(name = "Suhu", nullable = true)
	@Caption(value = "Suhu")
	private String suhu;
	
	@Column(name = "Hasil", nullable = true)
	@Caption(value = "Hasil")
	private String hasil;
	
	@ManyToOne
	@JoinColumn(name = "ObjectSupervisorFk")
	@NotNull(message = "Supervisor tidak boleh kosong") 
	@Caption(value="Object Supervisor")
	private Pegawai supervisor;
	
	@Column(name = "ObjectSupervisorFk", insertable = false, updatable = false, nullable = true)
	private Integer supervisorId;
	
	@ManyToOne
	@JoinColumn(name = "ObjectOperatorFk")
	@NotNull(message = "Operator tidak boleh kosong") 
	@Caption(value="Object Operator")
	private Pegawai operator;
	
	@Column(name = "ObjectOperatorFk", insertable = false, updatable = false, nullable = false)
	private Integer operatorId;
	
	@ManyToOne
	@JoinColumn(name="ObjectPencataanSuhuMesinFk")
	private PencatatanSuhuMesin pencatatanSuhuMesin;
	
	@Column(name="ObjectPencataanSuhuMesinFk", insertable=false, updatable=false, nullable=false)
	private String pencatatanSuhuMesinId;
	
	@Column(name="Keterangan", length=50, nullable=true)
	private String keterangan;

	public Date getTanggal() {
		return tanggal;
	}

	public void setTanggal(Date tanggal) {
		this.tanggal = tanggal;
	}

	public Mesin getMesin() {
		return mesin;
	}

	public void setMesin(Mesin mesin) {
		this.mesin = mesin;
	}

	public Integer getMesinId() {
		return mesinId;
	}

	public void setMesinId(Integer mesinId) {
		this.mesinId = mesinId;
	}

	public String getProgramMesin() {
		return programMesin;
	}

	public void setProgramMesin(String programMesin) {
		this.programMesin = programMesin;
	}

	public String getSuhu() {
		return suhu;
	}

	public void setSuhu(String suhu) {
		this.suhu = suhu;
	}

	public String getHasil() {
		return hasil;
	}

	public void setHasil(String hasil) {
		this.hasil = hasil;
	}

	public Pegawai getSupervisor() {
		return supervisor;
	}

	public void setSupervisor(Pegawai supervisor) {
		this.supervisor = supervisor;
	}

	public Integer getSupervisorId() {
		return supervisorId;
	}

	public void setSupervisorId(Integer supervisorId) {
		this.supervisorId = supervisorId;
	}

	public Pegawai getOperator() {
		return operator;
	}

	public void setOperator(Pegawai operator) {
		this.operator = operator;
	}

	public Integer getOperatorId() {
		return operatorId;
	}

	public void setOperatorId(Integer operatorId) {
		this.operatorId = operatorId;
	}

	public PencatatanSuhuMesin getPencatatanSuhuMesin() {
		return pencatatanSuhuMesin;
	}

	public void setPencatatanSuhuMesin(PencatatanSuhuMesin pencatatanSuhuMesin) {
		this.pencatatanSuhuMesin = pencatatanSuhuMesin;
	}

	public String getPencatatanSuhuMesinId() {
		return pencatatanSuhuMesinId;
	}

	public void setPencatatanSuhuMesinId(String pencatatanSuhuMesinId) {
		this.pencatatanSuhuMesinId = pencatatanSuhuMesinId;
	}

	public String getKeterangan() {
		return keterangan;
	}

	public void setKeterangan(String keterangan) {
		this.keterangan = keterangan;
	}
	
	
	

}
