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

	@ManyToOne
	@JoinColumn(name = "KelompokKompetensiFk")
	@NotNull(message = "Kelompok Kompetensi Harus Diisi")
	@Caption(value = "Kelompok Kompetensi")
	private KelompokKompetensi kelompokKompetensi;

	@Column(name = "KelompokKompetensiFk", insertable = false, updatable = false)
	private Integer kelompokKompetensiId;

	@Column(name = "JenisKompetensi", nullable = false, length = 100)
	@Caption(value = "JenisKompetensi")
	private String jenisKompetensi;

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

}