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

	@NotNull(message = "Jenis Diagnosa tidak boleh kosong")
	@Column(name = "JenisDiagnosa", nullable = false, length = 20)
	@Caption(value = "Jenis Diagnosa")
	private String jenisDiagnosa;

	@NotNull(message = "Kd Jenis Diagnosa tidak boleh kosong")
	@Column(name = "KdJenisDiagnosa", nullable = false)
	@Caption(value = "Kode Jenis Diagnosa")
	private Byte kdJenisDiagnosa;

	@NotNull(message = "QJenis Diagnosa tidak boleh kosong")
	@Column(name = "QJenisDiagnosa", nullable = false)
	@Caption(value = "QJenis Diagnosa")
	private Byte qJenisDiagnosa;

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

}