package com.jasamedika.medifirst2000.entities;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Table;

import com.google.gson.annotations.Expose;
import com.jasamedika.medifirst2000.base.BaseMaster;
import com.jasamedika.medifirst2000.helper.Caption;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

@Entity
@Table(name = "MappingJenisLinenToProduk_M")
public class MappingJenisLinenToProduk extends BaseMaster {

	private static final long serialVersionUID = -2249080125161409771L;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "JenisLinenFk")
	@Caption(value = "JenisLinen")
	private JenisLinen jenisLinen;

	@Column(name = "JenisLinenFk", insertable = false, updatable = false)
	private Integer jenisLinenId;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "AlatFk")
	@Caption(value = "Alat")
	private Alat alat;

	@Column(name = "AlatFk", insertable = false, updatable = false)
	private Integer alatId;
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ProdukFk")
	@Caption(value = "produk")
	private Produk produk;

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

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "SatuanStandarFk")
	@Caption(value = "SatuanStandar")
	private SatuanStandar satuanStandar;

	@Column(name = "SatuanStandarFk", insertable = false, updatable = false)
	private Integer satuanStandarId;
	
	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "public.bahanbaku_m_id_seq")
	@javax.persistence.SequenceGenerator(name = "public.bahanbaku_m_id_seq", sequenceName = "public.bahanbaku_m_id_seq", allocationSize = 1)
	@Column(name = "id")
	protected Integer id;
	
	@Column(name="qty")
	private Double qty;
	
	
	public Double getQty() {
		return qty;
	}

	public void setQty(Double qty) {
		this.qty = qty;
	}

	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 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 JenisLinen getJenisLinen() {
		return jenisLinen;
	}

	public void setJenisLinen(JenisLinen jenisLinen) {
		this.jenisLinen = jenisLinen;
	}

	public Integer getJenisLinenId() {
		return jenisLinenId;
	}

	public void setJenisLinenId(Integer jenisLinenId) {
		this.jenisLinenId = jenisLinenId;
	}

	public Integer getId() {

		return id;
	}

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

	public Alat getAlat() {
		return alat;
	}

	public void setAlat(Alat alat) {
		this.alat = alat;
	}
	
	
}
