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 KategoriPendidikan
 * 
 * @author Lukman Hakim
 */
@Getter
@Setter
@Entity
@Table(name = "kategoripendidikan_m")
public class KategoriPendidikan extends BaseMaster {

	@NotNull(message = "Nama Kategori tidak boleh kosong")
	@Column(name = "Nama", nullable = false, length = 100)
	@Caption(value = "Nama Kategori Pendidikan")
	private String nama;

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

}