package com.jasamedika.medifirst2000.entities;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

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

@Entity
@Table(name = "MapAlatToProdukToBhp_m")
public class MapAlatToProdukToBhp extends BaseMaster{
	@ManyToOne
	@JoinColumn(name = "alatFk")
	@Caption(value="Alat")
	private Alat alat;

	@Column(name = "alatFk", insertable=false,updatable=false,nullable=false)
	private Integer alatId;
	
	@ManyToOne
	@JoinColumn(name = "produkFk")
	@Caption(value="produk")
	private Produk produk;

	@Column(name = "produkFk", insertable=false,updatable=false,nullable=false)
	private Integer produkId;
	
	@ManyToOne
	@JoinColumn(name = "produkBFk")
	@Caption(value="produkB")
	private Produk produkB;

	@Column(name = "produkBFk", insertable=false,updatable=false,nullable=false)
	private Integer produkBId;

	@ManyToOne
	@JoinColumn(name = "satuanStandarBFk")
	@Caption(value="satuanStandarB")
	private SatuanStandar satuanStandarB;

	@Column(name = "satuanStandarBFk", insertable=false,updatable=false,nullable=false)
	private Integer satuanStandarBId;

	@Caption(value = "qty ProdukB")
	@Column(name = "qtyProdukB",nullable=false)
	private Double qtyProdukB;
	
	public Alat getAlat() {
		return alat;
	}
	public void setAlat(Alat alat) {
		this.alat = alat;
	}
	public Integer getAlatId() {
		return alatId;
	}
	public void setAlatId(Integer alatId) {
		this.alatId = alatId;
	}
	public Produk getProduk() {
		return produk;
	}
	public void setProduk(Produk produk) {
		this.produk = produk;
	}
	public Integer getProdukId() {
		return produkId;
	}
	public void setProdukId(Integer produkId) {
		this.produkId = produkId;
	}
	public Produk getProdukB() {
		return produkB;
	}
	public void setProdukB(Produk produkB) {
		this.produkB = produkB;
	}
	public SatuanStandar getSatuanStandarB() {
		return satuanStandarB;
	}
	public void setSatuanStandarB(SatuanStandar satuanStandarB) {
		this.satuanStandarB = satuanStandarB;
	}
	public Integer getSatuanStandarBId() {
		return satuanStandarBId;
	}
	public void setSatuanStandarBId(Integer satuanStandarBId) {
		this.satuanStandarBId = satuanStandarBId;
	}
	public Double getQtyProdukB() {
		return qtyProdukB;
	}
	public void setQtyProdukB(Double qtyProdukB) {
		this.qtyProdukB = qtyProdukB;
	}
	
	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "public.mapalattoproduktobhp_m_id_seq")
	@javax.persistence.SequenceGenerator(name = "public.mapalattoproduktobhp_m_id_seq", sequenceName = "public.mapalattoproduktobhp_m_id_seq", allocationSize = 1)
	@Column(name = "id")
	protected Integer id;

	public Integer getId() {

		return id;
	}

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

}
