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 MapRuanganToDetailJenisProduk
 * 
 * @author Generator
 */
@Entity // @Audited
@Table(name = "MapRuanganToDetailJenisProduk_M")
public class MapRuanganToDetailJenisProduk extends BaseMaster {
	@ManyToOne
	@JoinColumn(name = "ObjectDetailJenisProdukFk")
	@NotNull(message = "Kd Detail Jenis Produk tidak boleh kosong")

	@Caption(value = "Object Detail Jenis Produk")
	private DetailJenisProduk detailJenisProduk;

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

	public DetailJenisProduk getDetailJenisProduk() {
		return this.detailJenisProduk;
	}

	@Column(name = "ObjectDetailJenisProdukFk", insertable = false, updatable = false)
	private Integer detailJenisProdukId;

	@ManyToOne
	@JoinColumn(name = "ObjectRuanganFk")
	@NotNull(message = "Kd Ruangan tidak boleh kosong")

	@Caption(value = "Object Ruangan")
	private Ruangan ruangan;

	public void setRuangan(Ruangan ruangan) {
		this.ruangan = ruangan;
	}

	public Ruangan getRuangan() {
		return this.ruangan;
	}

	@Column(name = "ObjectRuanganFk", insertable = false, updatable = false, nullable = false)
	private Integer ruanganId;

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

	public Integer getId() {

		return id;
	}

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