package com.jasamedika.medifirst2000.entities;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import com.jasamedika.medifirst2000.base.BaseMaster;
import com.jasamedika.medifirst2000.helper.Caption;

/**
 * class MapKelompokPasienToPenjamin
 * 
 * @author Generator
 */
@Entity // @Audited
@Table(name = "MapKelompokPasienToPenjamin_M")
public class MapKelompokPasienToPenjamin extends BaseMaster {

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectKelompokPasienFk")
	@NotNull(message = "Kd Kelompok Pasien tidak boleh kosong")
	@Caption(value = "Object Kelompok Pasien")
	private KelompokPasien kelompokPasien;

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

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "kdPenjaminPasien")
	@Caption(value = "Object Rekanan")
	private Rekanan rekanan;

	@Column(name = "kdPenjaminPasien", insertable = false, updatable = false)
	private Integer jenisRekananId;

	public KelompokPasien getKelompokPasien() {
		return kelompokPasien;
	}

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

	public Integer getKelompokPasienId() {
		return kelompokPasienId;
	}

	public void setKelompokPasienId(Integer kelompokPasienId) {
		this.kelompokPasienId = kelompokPasienId;
	}

	public Rekanan getRekanan() {
		return rekanan;
	}

	public void setRekanan(Rekanan rekanan) {
		this.rekanan = rekanan;
	}

	public Integer getJenisRekananId() {
		return jenisRekananId;
	}

	public void setJenisRekananId(Integer jenisRekananId) {
		this.jenisRekananId = jenisRekananId;
	}

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

	public Integer getId() {

		return id;
	}

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

}
