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 KasusPenyakit
 * 
 * @author Generator
 */
@Entity // @Audited
@Table(name = "KasusPenyakit_M")
public class KasusPenyakit extends BaseMaster {
	@NotNull(message = "Kasus Penyakit tidak boleh kosong")
	@Column(name = "KasusPenyakit", nullable = false, length = 30)
	@Caption(value = "Kasus Penyakit")
	private String kasusPenyakit;

	public void setKasusPenyakit(String kasusPenyakit) {
		this.kasusPenyakit = kasusPenyakit;
	}

	public String getKasusPenyakit() {
		return this.kasusPenyakit;
	}

	@NotNull(message = "Kd Kasus Penyakit tidak boleh kosong")
	@Column(name = "KdKasusPenyakit", nullable = false)
	@Caption(value = "Kode Kasus Penyakit")
	private Byte kdKasusPenyakit;

	public void setKdKasusPenyakit(Byte kdKasusPenyakit) {
		this.kdKasusPenyakit = kdKasusPenyakit;
	}

	public Byte getKdKasusPenyakit() {
		return this.kdKasusPenyakit;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectPelayananProfileFk")

	@Caption(value = "Object Pelayanan Profile")
	private PelayananProfile pelayananProfile;

	public void setPelayananProfile(PelayananProfile pelayananProfile) {
		this.pelayananProfile = pelayananProfile;
	}

	public PelayananProfile getPelayananProfile() {
		return this.pelayananProfile;
	}

	@Column(name = "ObjectPelayananProfileFk", insertable = false, updatable = false)
	private Integer pelayananProfileId;

	@NotNull(message = "QKasus Penyakit tidak boleh kosong")
	@Column(name = "QKasusPenyakit", nullable = false)
	@Caption(value = "QKasus Penyakit")
	private Byte qKasusPenyakit;

	public void setqKasusPenyakit(Byte qKasusPenyakit) {
		this.qKasusPenyakit = qKasusPenyakit;
	}

	public Byte getqKasusPenyakit() {
		return this.qKasusPenyakit;
	}

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

	public Integer getId() {

		return id;
	}

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