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 KategoryDiet
 * 
 * @author Generator
 */
@Entity // @Audited
@Table(name = "KategoryDiet_M")
public class KategoryDiet extends BaseMaster {
	@NotNull(message = "Kategory Diet tidak boleh kosong")
	@Column(name = "KategoryDiet", nullable = false, length = 30)
	@Caption(value = "Kategory Diet")
	private String kategoryDiet;

	public void setKategoryDiet(String kategoryDiet) {
		this.kategoryDiet = kategoryDiet;
	}

	public String getKategoryDiet() {
		return this.kategoryDiet;
	}

	@NotNull(message = "Kd Kategory Diet tidak boleh kosong")
	@Column(name = "KdKategoryDiet", nullable = false)
	@Caption(value = "Kode Kategory Diet")
	private Byte kdKategoryDiet;

	public void setKdKategoryDiet(Byte kdKategoryDiet) {
		this.kdKategoryDiet = kdKategoryDiet;
	}

	public Byte getKdKategoryDiet() {
		return this.kdKategoryDiet;
	}

	@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)
	private Integer kelompokProdukId;

	@NotNull(message = "QKategory Diet tidak boleh kosong")
	@Column(name = "QKategoryDiet", nullable = false)
	@Caption(value = "QKategory Diet")
	private Byte qKategoryDiet;

	public void setqKategoryDiet(Byte qKategoryDiet) {
		this.qKategoryDiet = qKategoryDiet;
	}

	public Byte getqKategoryDiet() {
		return this.qKategoryDiet;
	}

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

	public Integer getId() {

		return id;
	}

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