package com.jasamedika.medifirst2000.vo;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.*;
import java.util.Date;
import org.hibernate.validator.constraints.NotEmpty;

import com.jasamedika.medifirst2000.base.vo.BaseMasterVO;
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.vo.BaseMasterVO;
import com.jasamedika.medifirst2000.helper.Caption;

/**
 *  class DetailJenisProduk
 * 
 * @author Generator
 */
//@Entity
//@Table(name = "DetailJenisProduk_M")
public class DetailJenisProdukVO extends BaseMasterVO {
	@Caption(value="Detail Jenis Produk")
	private String detailJenisProduk;

	public void setDetailJenisProduk(String detailJenisProduk) {
		this.detailJenisProduk = detailJenisProduk;
	}

	@Column(name = "DetailJenisProduk", nullable = false , length = 50)
	public String getDetailJenisProduk(){
		return this.detailJenisProduk;
	}

	@Caption(value="Is Registrasi Aset")
	private Byte isRegistrasiAset;

	public void setIsRegistrasiAset(Byte isRegistrasiAset) {
		this.isRegistrasiAset = isRegistrasiAset;
	}

	@Column(name = "isRegistrasiAset", nullable = true )
	public Byte getIsRegistrasiAset(){
		return this.isRegistrasiAset;
	}

	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name = "ObjectAccountFk")
	@Caption(value="Object Account")
	private ChartOfAccountVO account;

	public void setAccount(ChartOfAccountVO account) {
		this.account = account;
	}

	@Column(name = "KdAccount", nullable = true )
	public ChartOfAccountVO getAccount(){
		return this.account;
	}

	@Column(name = "ObjectAccountFk", insertable=false,updatable=false)
	private Integer accountId;

	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name = "ObjectDepartemenFk")
	@NotNull(message="Object DepartemenVO Harus Diisi")
	@Caption(value="Object Departemen")
	private DepartemenVO departemen;

	public void setDepartemen(DepartemenVO departemen) {
		this.departemen = departemen;
	}

	@Column(name = "KdDepartemen", nullable = false , length = 1)
	public DepartemenVO getDepartemen(){
		return this.departemen;
	}

	@Column(name = "ObjectDepartemenFk", insertable=false,updatable=false)
	private Integer departemenId;

	@Caption(value="Kode Detail Jenis Produk")
	private String kdDetailJenisProduk;

	public void setKdDetailJenisProduk(String kdDetailJenisProduk) {
		this.kdDetailJenisProduk = kdDetailJenisProduk;
	}

	@Column(name = "KdDetailJenisProduk", nullable = false , length = 4)
	public String getKdDetailJenisProduk(){
		return this.kdDetailJenisProduk;
	}

	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name = "ObjectJenisProdukFk")
	@NotNull(message="Object Jenis ProdukVO Harus Diisi")
	@Caption(value="Object Jenis Produk")
	private JenisProdukVO jenisProduk;

	public void setJenisProduk(JenisProdukVO jenisProduk) {
		this.jenisProduk = jenisProduk;
	}

	@Column(name = "KdJenisProduk", nullable = false , length = 2)
	public JenisProdukVO getJenisProduk(){
		return this.jenisProduk;
	}

	@Column(name = "ObjectJenisProdukFk", insertable=false,updatable=false)
	private Integer jenisProdukId;

	@Caption(value="Persen Harga Cito")
	private Double persenHargaCito;

	public void setPersenHargaCito(Double persenHargaCito) {
		this.persenHargaCito = persenHargaCito;
	}

	@Column(name = "PersenHargaCito", nullable = false )
	public Double getPersenHargaCito(){
		return this.persenHargaCito;
	}

	@Caption(value="QDetail Jenis Produk")
	private short qDetailJenisProduk;

	public void setqDetailJenisProduk(short qDetailJenisProduk) {
		this.qDetailJenisProduk = qDetailJenisProduk;
	}

	@Column(name = "QDetailJenisProduk", nullable = false )
	public short getqDetailJenisProduk(){
		return this.qDetailJenisProduk;
	}
	
	

	/*//
	@OneToMany(fetch=FetchType.LAZY, cascade = CascadeType.ALL, mappedBy="kddetailjenisproduk")
	private Set<HargaNettoProdukCitoD> HargaNettoProdukCitoDSet = new HashSet<HargaNettoProdukCitoD>();

	public Set<HargaNettoProdukCitoD> getHargaNettoProdukCitoDSet() {
		return HargaNettoProdukCitoDSet;
	}

	public void setHargaNettoProdukCitoDSet(Set<HargaNettoProdukCitoD> hargaNettoProdukCitoDSet) {
		HargaNettoProdukCitoDSet = hargaNettoProdukCitoDSet;
	}*/

}

