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 com.jasamedika.medifirst2000.base.BaseMaster;
import com.jasamedika.medifirst2000.helper.Caption;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

@Entity
@Table(name = "PengukuranKebisingan_M")
public class PengukuranKebisingan extends BaseMaster {

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

	@ManyToOne(fetch = FetchType.LAZY)
	@Caption(value = "Tanggal")
	@JoinColumn(name = "ObjectNamaRuanganFk")
	private Ruangan namaRuangan;
	
	//date : 17.09.2018
	//by : iwan kasan
	//ada permintaan dari K3KL
	//untuk ruangan diganti dengan edittable
	//tdk termapping dari master ruangan
	//nullable = true
	@Column(name = "ObjectNamaRuanganFk", nullable = true, insertable = false, updatable = false)
	private Integer namaRuanganId;

	@ManyToOne(fetch = FetchType.LAZY)
	@Caption(value = "Tanggal")
	@JoinColumn(name = "ObjectBakuMutuFk")
	private BakuMutu bakuMutu;

	//date : 17.09.2018
	//by : iwan kasan
	//ada permintaan dari K3KL
	//untuk ruangan diganti dengan edittable
	//tdk termapping dari master ruangan
	//nullable = true
	@Column(name = "ObjectBakuMutuFk", nullable = true, insertable = false, updatable = false)
	private Integer bakuMutuId;

	@Caption(value = "Hasil Pengukuran")
	@Column(name = "HasilPengukuran")
	private Integer hasilPengukuran;
	
	@Column(name="NilaiBakuMutu")
	private Integer nilaiBakuMutu;
	
	@Column(name="Keterangan")
	private String keterangan;

	@Column(name="menutype")
	private String menutype;
	
	public Date getTanggal() {
		return tanggal;
	}

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

	public Ruangan getNamaRuangan() {
		return namaRuangan;
	}

	public void setNamaRuangan(Ruangan namaRuangan) {
		this.namaRuangan = namaRuangan;
	}

	public Integer getNamaRuanganId() {
		return namaRuanganId;
	}

	public void setNamaRuanganId(Integer namaRuanganId) {
		this.namaRuanganId = namaRuanganId;
	}

	public BakuMutu getBakuMutu() {
		return bakuMutu;
	}

	public void setBakuMutu(BakuMutu bakuMutu) {
		this.bakuMutu = bakuMutu;
	}

	public Integer getBakuMutuId() {
		return bakuMutuId;
	}

	public void setBakuMutuId(Integer bakuMutuId) {
		this.bakuMutuId = bakuMutuId;
	}

	public Integer getHasilPengukuran() {
		return hasilPengukuran;
	}

	public void setHasilPengukuran(Integer hasilPengukuran) {
		this.hasilPengukuran = hasilPengukuran;
	}

	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "public.pengukurankebisingan_m_id_seq")
	@javax.persistence.SequenceGenerator(name = "public.pengukurankebisingan_m_id_seq", sequenceName = "public.pengukurankebisingan_m_id_seq", allocationSize = 1)
	@Column(name = "id")
	protected Integer id;

	public Integer getId() {

		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getNilaiBakuMutu() {
		return nilaiBakuMutu;
	}

	public void setNilaiBakuMutu(Integer nilaiBakuMutu) {
		this.nilaiBakuMutu = nilaiBakuMutu;
	}

	public String getKeterangan() {
		return keterangan;
	}

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

	public String getMenutype() {
		return menutype;
	}

	public void setMenutype(String menutype) {
		this.menutype = menutype;
	}
	
}
