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 PenyebabKematian
 * 
 * @author Generator
 */
@Entity // @Audited
@Table(name = "PenyebabKematian_M")
public class PenyebabKematian extends BaseMaster {
	@NotNull(message = "Kd Penyebab Kematian tidak boleh kosong")
	@Column(name = "KdPenyebabKematian", nullable = false)
	@Caption(value = "Kode Penyebab Kematian")
	private Byte kdPenyebabKematian;

	public void setKdPenyebabKematian(Byte kdPenyebabKematian) {
		this.kdPenyebabKematian = kdPenyebabKematian;
	}

	public Byte getKdPenyebabKematian() {
		return this.kdPenyebabKematian;
	}

	@NotNull(message = "Penyebab Kematian tidak boleh kosong")
	@Column(name = "PenyebabKematian", nullable = false, length = 50)
	@Caption(value = "Penyebab Kematian")
	private String penyebabKematian;

	public void setPenyebabKematian(String penyebabKematian) {
		this.penyebabKematian = penyebabKematian;
	}

	public String getPenyebabKematian() {
		return this.penyebabKematian;
	}

	@NotNull(message = "QPenyebab Kematian tidak boleh kosong")
	@Column(name = "QPenyebabKematian", nullable = false)
	@Caption(value = "QPenyebab Kematian")
	private Byte qPenyebabKematian;

	public void setqPenyebabKematian(Byte qPenyebabKematian) {
		this.qPenyebabKematian = qPenyebabKematian;
	}

	public Byte getqPenyebabKematian() {
		return this.qPenyebabKematian;
	}

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

	public Integer getId() {

		return id;
	}

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