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

	@Column(name = "Bobot", nullable = false, length = 100)
	@Caption(value = "Bobot")
	private Integer bobot;

	@Column(name = "Targer", nullable = false, length = 100)
	@Caption(value = "Targer")
	private Integer targer;

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

	@ManyToOne
	@JoinColumn(name = "PegawaiFk")
	@NotNull(message = "Pegawai Harus Diisi")
	@Caption(value = "Pegawai")
	private Pegawai pegawai;

	@Column(name = "PegawaiFk", insertable = false, updatable = false)
	private Integer pegawaiId;

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

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

}