package com.jasamedika.medifirst2000.entities;

import com.jasamedika.medifirst2000.base.BaseMaster;
import com.jasamedika.medifirst2000.helper.Caption;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;
import javax.validation.constraints.NotNull;

import static javax.persistence.GenerationType.SEQUENCE;

/**
 * class PenyebabKematian
 * 
 * @author Generator
 */
@Getter
@Setter
@Entity
@Table(name = "PenyebabKematian_M")
public class PenyebabKematian extends BaseMaster {
	@Id
	@GeneratedValue(strategy = SEQUENCE, generator = "public.penyebabkematian_m_id_seq")
	@SequenceGenerator(name = "public.penyebabkematian_m_id_seq", sequenceName = "public.penyebabkematian_m_id_seq", allocationSize = 1)
	@Column(name = "id")
	protected Integer id;

	@NotNull(message = "Kd Penyebab Kematian tidak boleh kosong")
	@Column(name = "KdPenyebabKematian", nullable = false)
	@Caption(value = "Kode Penyebab Kematian")
	private Byte kdPenyebabKematian;

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

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