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 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 LevelProduk
 * 
 * @author Generator
 */
@Entity // @Audited
@Table(name = "LevelProduk_M")
public class LevelProduk extends BaseMaster {
	@ManyToOne
	@JoinColumn(name = "ObjectDepartemenFk")
	@NotNull(message = "Kd Departemen tidak boleh kosong")

	@Caption(value = "Object Departemen")
	private Departemen departemen;

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

	public Departemen getDepartemen() {
		return this.departemen;
	}

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

	@ManyToOne
	@JoinColumn(name = "ObjectKelompokProdukFk")

	@Caption(value = "Object Kelompok Produk")
	private KelompokProduk kelompokProduk;

	public void setKelompokProduk(KelompokProduk kelompokProduk) {
		this.kelompokProduk = kelompokProduk;
	}

	public KelompokProduk getKelompokProduk() {
		return this.kelompokProduk;
	}

	@Column(name = "ObjectKelompokProdukFk", insertable = false, updatable = false, nullable = false)
	private Integer kelompokProdukId;

	@NotNull(message = "Kd Level Produk tidak boleh kosong")
	@Column(name = "KdLevelProduk", nullable = false)
	@Caption(value = "Kode Level Produk")
	private Byte kdLevelProduk;

	public void setKdLevelProduk(Byte kdLevelProduk) {
		this.kdLevelProduk = kdLevelProduk;
	}

	public Byte getKdLevelProduk() {
		return this.kdLevelProduk;
	}

	@NotNull(message = "Level Produk tidak boleh kosong")
	@Column(name = "LevelProduk", nullable = false, length = 30)
	@Caption(value = "Level Produk")
	private String levelProduk;

	public void setLevelProduk(String levelProduk) {
		this.levelProduk = levelProduk;
	}

	public String getLevelProduk() {
		return this.levelProduk;
	}

	@NotNull(message = "QLevel Produk tidak boleh kosong")
	@Column(name = "QLevelProduk", nullable = false)
	@Caption(value = "QLevel Produk")
	private Byte qLevelProduk;

	public void setqLevelProduk(Byte qLevelProduk) {
		this.qLevelProduk = qLevelProduk;
	}

	public Byte getqLevelProduk() {
		return this.qLevelProduk;
	}

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

	public Integer getId() {

		return id;
	}

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