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 KelompokPenyebabDiagnosa
 * 
 * @author Generator
 */
@Getter
@Setter
@Entity
@Table(name = "KelompokPenyebabDiagnosa_M")
public class KelompokPenyebabDiagnosa extends BaseMaster {

	@NotNull(message = "Kd Kelompok P Diagnosa tidak boleh kosong")
	@Column(name = "KdKelompokPDiagnosa", nullable = false, length = 2)
	@Caption(value = "Kode Kelompok P Diagnosa")
	private String kdKelompokPDiagnosa;

	@NotNull(message = "Kelompok P Diagnosa tidak boleh kosong")
	@Column(name = "KelompokPDiagnosa", nullable = false, length = 50)
	@Caption(value = "Kelompok P Diagnosa")
	private String kelompokPDiagnosa;

	@NotNull(message = "QKelompok P Diagnosa tidak boleh kosong")
	@Column(name = "QKelompokPDiagnosa", nullable = false)
	@Caption(value = "QKelompok P Diagnosa")
	private Byte qKelompokPDiagnosa;

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

}