package com.jasamedika.medifirst2000.entities;

import java.io.Serializable;
import org.hibernate.envers.Audited;
import javax.persistence.*;

import org.hibernate.validator.constraints.NotEmpty;

import com.jasamedika.medifirst2000.base.BaseMaster;
import com.jasamedika.medifirst2000.base.BaseMasterStokProdukGlobal;

import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.internal.util.logging.Messages;

import com.fasterxml.jackson.annotation.JsonManagedReference;
import com.jasamedika.medifirst2000.base.BaseMaster;
import com.jasamedika.medifirst2000.helper.Caption;
import org.hibernate.envers.Audited;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

/**
 * class StokProdukGlobal
 * 
 * @author Generator
 */
@Entity // @Audited
@Table(name = "StokProdukGlobal_M")
public class StokProdukGlobal extends BaseMasterStokProdukGlobal {
	@Column(name = "HargaDiscount", nullable = true)
	@Caption(value = "Harga Discount")
	private Double hargaDiscount;

	@Column(name = "HargaNetto1", nullable = true)
	@Caption(value = "Harga Netto1")
	private Double hargaNetto1;

	@Column(name = "HargaNetto2", nullable = true)
	@Caption(value = "Harga Netto2")
	private Double hargaNetto2;

	@ManyToOne
	@JoinColumn(name = "ObjectAsalProdukFk")
	@Caption(value = "Object Asal Produk")
	private AsalProduk asalProduk;

	@Column(name = "ObjectAsalProdukFk", insertable = false, updatable = false)
	private Integer asalProdukId;

	@ManyToOne
	@JoinColumn(name = "ObjectLokasiFk")
	@Caption(value = "Object Lokasi")
	private Lokasi lokasi;

	@Column(name = "ObjectLokasiFk", insertable = false, updatable = false, nullable = true)
	private Integer lokasiId;

	@ManyToOne
	@JoinColumn(name = "ObjectProdukFk")
	@Caption(value = "Object Produk")
	private Produk produk;

	@Column(name = "ObjectProdukFk", insertable = false, updatable = false, nullable = true)
	private Integer produkId;

	@ManyToOne
	@JoinColumn(name = "ObjectRuanganFk")
	@Caption(value = "Object Ruangan")
	private Ruangan ruangan;

	@Column(name = "ObjectRuanganFk", insertable = false, updatable = false, nullable = true)
	private Integer ruanganId;

	@Column(name = "PersenDiscount", nullable = true)
	@Caption(value = "Persen Discount")
	private Double persenDiscount;

	@Column(name = "QtyProduk", nullable = true)
	@Caption(value = "Qty Produk")
	private Double qtyProduk;

	@Column(name = "QtyProdukMax", nullable = true)
	@Caption(value = "Qty Produk Max")
	private Double qtyProdukMax;

	@Column(name = "QtyProdukMin", nullable = true)
	@Caption(value = "Qty Produk Min")
	private Double qtyProdukMin;

	@Column(name = "QtyProdukOnHand", nullable = true)
	@Caption(value = "Qty Produk On Hand")
	private Double qtyProdukOnHand;

	public Double getHargaDiscount() {
		return hargaDiscount;
	}

	public void setHargaDiscount(Double hargaDiscount) {
		this.hargaDiscount = hargaDiscount;
	}

	public Double getHargaNetto1() {
		return hargaNetto1;
	}

	public void setHargaNetto1(Double hargaNetto1) {
		this.hargaNetto1 = hargaNetto1;
	}

	public Double getHargaNetto2() {
		return hargaNetto2;
	}

	public void setHargaNetto2(Double hargaNetto2) {
		this.hargaNetto2 = hargaNetto2;
	}

	public AsalProduk getAsalProduk() {
		return asalProduk;
	}

	public void setAsalProduk(AsalProduk asalProduk) {
		this.asalProduk = asalProduk;
	}

	public Integer getAsalProdukId() {
		return asalProdukId;
	}

	public void setAsalProdukId(Integer asalProdukId) {
		this.asalProdukId = asalProdukId;
	}

	public Lokasi getLokasi() {
		return lokasi;
	}

	public void setLokasi(Lokasi lokasi) {
		this.lokasi = lokasi;
	}

	public Integer getLokasiId() {
		return lokasiId;
	}

	public void setLokasiId(Integer lokasiId) {
		this.lokasiId = lokasiId;
	}

	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 Ruangan getRuangan() {
		return ruangan;
	}

	public void setRuangan(Ruangan ruangan) {
		this.ruangan = ruangan;
	}

	public Integer getRuanganId() {
		return ruanganId;
	}

	public void setRuanganId(Integer ruanganId) {
		this.ruanganId = ruanganId;
	}

	public Double getPersenDiscount() {
		return persenDiscount;
	}

	public void setPersenDiscount(Double persenDiscount) {
		this.persenDiscount = persenDiscount;
	}

	public Double getQtyProduk() {
		return qtyProduk;
	}

	public void setQtyProduk(Double qtyProduk) {
		this.qtyProduk = qtyProduk;
	}

	public Double getQtyProdukMax() {
		return qtyProdukMax;
	}

	public void setQtyProdukMax(Double qtyProdukMax) {
		this.qtyProdukMax = qtyProdukMax;
	}

	public Double getQtyProdukMin() {
		return qtyProdukMin;
	}

	public void setQtyProdukMin(Double qtyProdukMin) {
		this.qtyProdukMin = qtyProdukMin;
	}

	public Double getQtyProdukOnHand() {
		return qtyProdukOnHand;
	}

	public void setQtyProdukOnHand(Double qtyProdukOnHand) {
		this.qtyProdukOnHand = qtyProdukOnHand;
	}

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

	public Integer getId() {

		return id;
	}

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