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

	@NotNull(message = "Kd Kelompok Umur tidak boleh kosong")
	@Column(name = "KdKelompokUmur", nullable = false)
	@Caption(value = "Kode Kelompok Umur")
	private Byte kdKelompokUmur;

	@NotNull(message = "Kelompok Umur tidak boleh kosong")
	@Column(name = "KelompokUmur", nullable = false, length = 20)
	@Caption(value = "Kelompok Umur")
	private String kelompokUmur;

	@NotNull(message = "QKelompok Umur tidak boleh kosong")
	@Column(name = "QKelompokUmur", nullable = false)
	@Caption(value = "QKelompok Umur")
	private Byte qKelompokUmur;

	@Column(name = "StatusUmur", length = 2)
	@Caption(value = "Status Umur")
	private String statusUmur;

	@NotNull(message = "Umur Max tidak boleh kosong")
	@Column(name = "UmurMax", nullable = false)
	@Caption(value = "Umur Max")
	private Double umurMax;

	@NotNull(message = "Umur Min tidak boleh kosong")
	@Column(name = "UmurMin", nullable = false)
	@Caption(value = "Umur Min")
	private Double umurMin;

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

}