package com.jasamedika.medifirst2000.entities;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
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 KualifikasiJurusan
 * 
 * @author Generator
 */
@Getter
@Setter
@Entity
@JsonIgnoreProperties({ "hibernateLazyInitializer", "handler" })
@Table(name = "KualifikasiJurusan_M")
public class KualifikasiJurusan extends BaseMaster {

	@NotNull(message = "Kd Kualifikasi Jurusan tidak boleh kosong")
	@Column(name = "KdKualifikasiJurusan", nullable = false, length = 4)
	@Caption(value = "Kode Kualifikasi Jurusan")
	private String kdKualifikasiJurusan;

	@ManyToOne
	@JoinColumn(name = "ObjectPendidikanFk")
	@Caption(value = "Object Pendidikan")
	private Pendidikan pendidikan;

	@Column(name = "ObjectPendidikanFk", insertable = false, updatable = false)
	private Integer pendidikanId;

	@NotNull(message = "Kualifikasi Jurusan tidak boleh kosong")
	@Column(name = "KualifikasiJurusan", nullable = false, length = 75)
	@Caption(value = "Kualifikasi Jurusan")
	private String kualifikasiJurusan;

	@NotNull(message = "QKualifikasi Jurusan tidak boleh kosong")
	@Column(name = "QKualifikasiJurusan", nullable = false)
	@Caption(value = "QKualifikasi Jurusan")
	private short qKualifikasiJurusan;

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

}