package com.jasamedika.medifirst2000.entities;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
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.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.jasamedika.medifirst2000.base.BaseMaster;
import com.jasamedika.medifirst2000.helper.Caption;

/**
 * class PlanningDiklatHumasMarketBiaya
 * 
 * @author Lukman Hakim
 */
@Entity  
@Table(name = "PlanningDiklatHumasMarketBiaya_T")
@JsonIgnoreProperties({ "hibernateLazyInitializer", "handler" })
public class PlanningDiklatHumasMarketBiaya extends BaseMaster {
	@Id
	@GeneratedValue(
		    strategy=GenerationType.SEQUENCE, 
		    generator="public.planningdiklathumasmarketbiaya_t_id_seq")
	@javax.persistence.SequenceGenerator(
			name="public.planningdiklathumasmarketbiaya_t_id_seq",
			sequenceName="public.planningdiklathumasmarketbiaya_t_id_seq",
			allocationSize=1 //auto increment 1
			)
	@Column(name = "id")
	protected Integer id;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}
	
	@Column(name = "noPlanning", nullable = false, length = 100)
	@Caption(value = "No Planning")
	private String noPlanning;

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

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "pegawaiFk")
	@Caption(value = "Pegawai")
	private Pegawai pegawai;
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "produkFk")
	@Caption(value = "Produk")
	private Produk produk;
	
	//add by iwankasan
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "produkKelasFk")
	@Caption(value = "Produk By Class Harga")
	private HargaNettoProdukByKelas produkKelas;
	
	@Column(name = "produkKelasFk", insertable = false, updatable = false)
	private Integer produkKelasId;
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectStrukPlanning")
	@Caption(value = "Struk Planning")
	private StrukPlanning strukPlanning;

	@Column(name = "ObjectStrukPlanning", columnDefinition = "CHAR(32)", insertable = false, updatable = false)
	private String strukPlanningId;
	
	public HargaNettoProdukByKelas getProdukKelas() {
		return produkKelas;
	}

	public void setProdukKelas(HargaNettoProdukByKelas produkKelas) {
		this.produkKelas = produkKelas;
	}

	public Integer getProdukKelasId() {
		return produkKelasId;
	}

	public void setProdukKelasId(Integer produkKelasId) {
		this.produkKelasId = produkKelasId;
	}
	
	//add by iwankasan
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "AsalProdukFk")
	@Caption(value = "Asal ")
	private AsalProduk asalProduk;
		
	@Column(name = "AsalProdukFk", insertable = false, updatable = false)
	private Integer asalProdukId;
	
	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;
	}

	@Column(name = "QtyProduk")
	@Caption(value = "Quantity Produk")
	private Double qtyProduk;
	
	@Column(name = "HargaSatuan")
	@Caption(value = "Harga Satuan")
	private Double hargaSatuan;

	@Column(name = "PersenDiskon")
	@Caption(value = "Persen Diskon")
	private Double persenDiskon;

	@Column(name = "HargaDiskon")
	@Caption(value = "Harga Diskon")
	private Double hargaDiskon;

	@Column(name = "HargaPPN")
	@Caption(value = "Harga PPN")
	private Double hargaPPN;

	@Column(name = "HargaPPH")
	@Caption(value = "Harga PPH")
	private Double hargaPPH;

	@Column(name = "HargaTambahan")
	@Caption(value = "Harga Tambahan")
	private Double hargaTambahan;

	@Column(name = "IsInOut")
	@Caption(value = "Is In Out")
	private Byte isInOut;

	@Column(name = "noStruk")
	@Caption(value = "No Struk")
	private String noStruk;
	
	@Column(name = "noVerifikasi")
	@Caption(value = "No Verifikasi")
	private String noVerifikasi;
	
	@Column(name = "NoRetur")
	@Caption(value = "No Retur")
	private String noRetur;
	
	@Column(name = "keterangan")
	@Caption(value = "Keterangan Lainnya")
	private String keterangan;
	
	@Column(name = "DeskripsiDetailProduk")
	@Caption(value = "Deskripsi Detail Produk")
	private String deskripsiDetailProduk;

	 //add by iwankasan
	@Column(name = "KdProdukDHM")
	@Caption(value = "Kd Produk DHM")
	private String kdProdukDHM;
	
	@Column(name="isSetBiayaPeserta")
	@Caption(value = "Apakah Biaya dibebankan sama peserta")
	private Boolean isSetBiayaPeserta;	
	
	public String getKdProdukDHM() {
		return kdProdukDHM;
	}

	public void setKdProdukDHM(String kdProdukDHM) {
		this.kdProdukDHM = kdProdukDHM;
	}

	public String getNoPlanning() {
		return noPlanning;
	}

	public void setNoPlanning(String noPlanning) {
		this.noPlanning = noPlanning;
	}

	public Date getTglPlanning() {
		return tglPlanning;
	}

	public void setTglPlanning(Date tglPlanning) {
		this.tglPlanning = tglPlanning;
	}

	public Pegawai getPegawai() {
		return pegawai;
	}

	public void setPegawai(Pegawai pegawai) {
		this.pegawai = pegawai;
	}

	public Produk getProduk() {
		return produk;
	}

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

	public Double getQtyProduk() {
		return qtyProduk;
	}

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

	public Double getHargaSatuan() {
		return hargaSatuan;
	}

	public void setHargaSatuan(Double hargaSatuan) {
		this.hargaSatuan = hargaSatuan;
	}

	public Double getPersenDiskon() {
		return persenDiskon;
	}

	public void setPersenDiskon(Double persenDiskon) {
		this.persenDiskon = persenDiskon;
	}

	public Double getHargaDiskon() {
		return hargaDiskon;
	}

	public void setHargaDiskon(Double hargaDiskon) {
		this.hargaDiskon = hargaDiskon;
	}

	public Double getHargaPPN() {
		return hargaPPN;
	}

	public void setHargaPPN(Double hargaPPN) {
		this.hargaPPN = hargaPPN;
	}

	public Double getHargaPPH() {
		return hargaPPH;
	}

	public void setHargaPPH(Double hargaPPH) {
		this.hargaPPH = hargaPPH;
	}

	public Double getHargaTambahan() {
		return hargaTambahan;
	}

	public void setHargaTambahan(Double hargaTambahan) {
		this.hargaTambahan = hargaTambahan;
	}

	public Byte getIsInOut() {
		return isInOut;
	}

	public void setIsInOut(Byte isInOut) {
		this.isInOut = isInOut;
	}

	public String getNoStruk() {
		return noStruk;
	}

	public void setNoStruk(String noStruk) {
		this.noStruk = noStruk;
	}

	public String getNoVerifikasi() {
		return noVerifikasi;
	}

	public void setNoVerifikasi(String noVerifikasi) {
		this.noVerifikasi = noVerifikasi;
	}

	public String getNoRetur() {
		return noRetur;
	}

	public void setNoRetur(String noRetur) {
		this.noRetur = noRetur;
	}

	public String getKeterangan() {
		return keterangan;
	}

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

	public String getDeskripsiDetailProduk() {
		return deskripsiDetailProduk;
	}

	public void setDeskripsiDetailProduk(String deskripsiDetailProduk) {
		this.deskripsiDetailProduk = deskripsiDetailProduk;
	}

	public Boolean getIsSetBiayaPeserta() {
		return isSetBiayaPeserta;
	}

	public void setIsSetBiayaPeserta(Boolean isSetBiayaPeserta) {
		this.isSetBiayaPeserta = isSetBiayaPeserta;
	}

	public StrukPlanning getStrukPlanning() {
		return strukPlanning;
	}

	public void setStrukPlanning(StrukPlanning strukPlanning) {
		this.strukPlanning = strukPlanning;
	}

	public String getStrukPlanningId() {
		return strukPlanningId;
	}

	public void setStrukPlanningId(String strukPlanningId) {
		this.strukPlanningId = strukPlanningId;
	}

	 

}
