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 MenuDietCaraMasak
 * 
 * @author Generator
 */
@Entity // @Audited
@Table(name = "MenuDietCaraMasak_M")
public class MenuDietCaraMasak extends BaseMaster {
	@NotNull(message = "Cara Masak tidak boleh kosong")
	@Column(name = "CaraMasak", nullable = false, length = 300)
	@Caption(value = "Cara Masak")
	private String caraMasak;

	public void setCaraMasak(String caraMasak) {
		this.caraMasak = caraMasak;
	}

	public String getCaraMasak() {
		return this.caraMasak;
	}

	@ManyToOne
	@JoinColumn(name = "ObjectProdukMDFk")
	@NotNull(message = "Kd Produk M D tidak boleh kosong")

	@Caption(value = "Object Produk M D")
	private Produk produkMD;

	public void setProdukMD(Produk produkMD) {
		this.produkMD = produkMD;
	}

	public Produk getProdukMD() {
		return this.produkMD;
	}

	@Column(name = "ObjectProdukMDFk", insertable = false, updatable = false)
	private Integer produkMDId;

	@Column(name = "KeteranganLainnya", nullable = true, length = 150)
	@Caption(value = "Keterangan Lainnya")
	private String keteranganLainnya;

	public void setKeteranganLainnya(String keteranganLainnya) {
		this.keteranganLainnya = keteranganLainnya;
	}

	public String getKeteranganLainnya() {
		return this.keteranganLainnya;
	}

	@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;
	}

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

	public Integer getId() {

		return id;
	}

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