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 MapPaketPenjaminToProduk
 * 
 * @author Generator
 */
@Entity // @Audited
@Table(name = "MapPaketPenjaminToProduk_M")
public class MapPaketPenjaminToProduk extends BaseMaster {
	@ManyToOne
	@JoinColumn(name = "ObjectGolonganAsuransiFk")
	@NotNull(message = "Kd Golongan Asuransi tidak boleh kosong")

	@Caption(value = "Object Golongan Asuransi")
	private GolonganAsuransi kdGolonganAsuransi;

	public void setGolonganAsuransi(GolonganAsuransi kdGolonganAsuransi) {
		this.kdGolonganAsuransi = kdGolonganAsuransi;
	}

	public GolonganAsuransi getGolonganAsuransi() {
		return this.kdGolonganAsuransi;
	}

	@Column(name = "ObjectGolonganAsuransiFk", insertable = false, updatable = false)
	private Integer golonganAsuransiId;

	@ManyToOne
	@JoinColumn(name = "ObjectHubunganPesertaFk")
	@NotNull(message = "Kd Hubungan Peserta tidak boleh kosong")

	@Caption(value = "Object Hubungan Peserta")
	private HubunganPesertaAsuransi hubunganPeserta;

	public void setHubunganPeserta(HubunganPesertaAsuransi hubunganPeserta) {
		this.hubunganPeserta = hubunganPeserta;
	}

	public HubunganPesertaAsuransi getHubunganPeserta() {
		return this.hubunganPeserta;
	}

	@Column(name = "ObjectHubunganPesertaFk", insertable = false, updatable = false, nullable = false)
	private Integer hubunganPesertaId;

	@ManyToOne
	@JoinColumn(name = "ObjectKelompokPasienFk")
	@NotNull(message = "Kd Kelompok Pasien tidak boleh kosong")

	@Caption(value = "Object Kelompok Pasien")
	private KelompokPasien kelompokPasien;

	public void setKelompokPasien(KelompokPasien kelompokPasien) {
		this.kelompokPasien = kelompokPasien;
	}

	public KelompokPasien getKelompokPasien() {
		return this.kelompokPasien;
	}

	@Column(name = "ObjectKelompokPasienFk", insertable = false, updatable = false, nullable = false)
	private Integer kelompokPasienId;

	@ManyToOne
	@JoinColumn(name = "ObjectPaketFk")
	@NotNull(message = "Kd Paket tidak boleh kosong")

	@Caption(value = "Object Paket")
	private Paket paket;

	public void setPaket(Paket paket) {
		this.paket = paket;
	}

	public Paket getPaket() {
		return this.paket;
	}

	@Column(name = "ObjectPaketFk", insertable = false, updatable = false, nullable = false)
	private Integer paketId;

	@NotNull(message = "Kd Penjamin Pasien tidak boleh kosong")
	@Column(name = "KdPenjaminPasien", nullable = false)
	@Caption(value = "Kode Penjamin Pasien")
	private short kdPenjaminPasien;

	public void setKdPenjaminPasien(short kdPenjaminPasien) {
		this.kdPenjaminPasien = kdPenjaminPasien;
	}

	public short getKdPenjaminPasien() {
		return this.kdPenjaminPasien;
	}

	@ManyToOne
	@JoinColumn(name = "ObjectProdukFk")
	@NotNull(message = "Kd Produk tidak boleh kosong")

	@Caption(value = "Object Produk")
	private Produk produk;

	public void setProduk(Produk produk) {
		this.produk = produk;
	}

	public Produk getProduk() {
		return this.produk;
	}

	@Column(name = "ObjectProdukFk", insertable = false, updatable = false, nullable = false)
	private Integer produkId;

	@Column(name = "QtyMaxProduk", nullable = true)
	@Caption(value = "Qty Max Produk")
	private short qtyMaxProduk;

	public void setqtyMaxProduk(short qtyMaxProduk) {
		this.qtyMaxProduk = qtyMaxProduk;
	}

	public short getqtyMaxProduk() {
		return this.qtyMaxProduk;
	}

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

	public Integer getId() {

		return id;
	}

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