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 KeteranganDiet
 * 
 * @author Generator
 */
@Entity // @Audited
@Table(name = "KeteranganDiet_M")
public class KeteranganDiet extends BaseMaster {
	@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 = "Kd Keterangan Diet tidak boleh kosong")
	@Column(name = "KdKeteranganDiet", nullable = false)
	@Caption(value = "Kode Keterangan Diet")
	private Byte kdKeteranganDiet;

	public void setKdKeteranganDiet(Byte kdKeteranganDiet) {
		this.kdKeteranganDiet = kdKeteranganDiet;
	}

	public Byte getKdKeteranganDiet() {
		return this.kdKeteranganDiet;
	}

	@NotNull(message = "Keterangan Diet tidak boleh kosong")
	@Column(name = "KeteranganDiet", nullable = false, length = 50)
	@Caption(value = "Keterangan Diet")
	private String keteranganDiet;

	public void setKeteranganDiet(String keteranganDiet) {
		this.keteranganDiet = keteranganDiet;
	}

	public String getKeteranganDiet() {
		return this.keteranganDiet;
	}

	@NotNull(message = "No Urut tidak boleh kosong")
	@Column(name = "NoUrut", nullable = false)
	@Caption(value = "No Urut")
	private Byte noUrut;

	public void setNoUrut(Byte noUrut) {
		this.noUrut = noUrut;
	}

	public Byte getNoUrut() {
		return this.noUrut;
	}

	@NotNull(message = "QKeterangan Diet tidak boleh kosong")
	@Column(name = "QKeteranganDiet", nullable = false)
	@Caption(value = "QKeterangan Diet")
	private Byte qKeteranganDiet;

	public void setqKeteranganDiet(Byte qKeteranganDiet) {
		this.qKeteranganDiet = qKeteranganDiet;
	}

	public Byte getqKeteranganDiet() {
		return this.qKeteranganDiet;
	}

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

	public Integer getId() {

		return id;
	}

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