package com.jasamedika.medifirst2000.vo;

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

import com.jasamedika.medifirst2000.base.vo.BaseMasterVO;
import com.jasamedika.medifirst2000.entities.SatuanStandar;
import com.jasamedika.medifirst2000.helper.Caption;

/**
 * class MapPaketToProduk
 * 
 * @author Generator
 */
// @Entity
// @Table(name = "MapPaketToProduk_M")
public class MapPaketToProdukVO extends BaseMasterVO {
	@ManyToOne
	@JoinColumn(name = "ObjectPaketFk")
	@NotNull(message = "Object PaketVO Harus Diisi")
	@Caption(value = "Object Paket")
	private PaketVO paket;

	public void setPaket(PaketVO paket) {
		this.paket = paket;
	}

	@Column(name = "KdPaket", nullable = false)
	public PaketVO getPaket() {
		return this.paket;
	}

	@Column(name = "ObjectPaketFk", insertable = false, updatable = false)
	private Integer paketId;

	@ManyToOne
	@JoinColumn(name = "ObjectProdukFk")
	@NotNull(message = "Object ProdukVO Harus Diisi")
	@Caption(value = "Object Produk")
	private ProdukVO produk;

	public void setProduk(ProdukVO produk) {
		this.produk = produk;
	}

	@Column(name = "KdProduk", nullable = false, length = 6)
	public ProdukVO getProduk() {
		return this.produk;
	}

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

	@Caption(value = "Qty Produk")
	private Double qtyProduk;

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

	@Column(name = "QtyProduk", nullable = true)
	public Double getqtyProduk() {
		return this.qtyProduk;
	}

	public Double getQtyProduk() {
		return qtyProduk;
	}

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

	@ManyToOne
	@JoinColumn(name = "ObjectSatuanFk")
	@NotNull(message = "Satuan tidak boleh kosong")
	@Caption(value = "Object Satuan")
	private SatuanStandarVO satuan;

	public SatuanStandarVO getSatuan() {
		return satuan;
	}

	public void setSatuan(SatuanStandarVO satuan) {
		this.satuan = satuan;
	}

}
