package com.jasamedika.medifirst2000.entities;

import com.jasamedika.medifirst2000.helper.Caption;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

import static javax.persistence.GenerationType.SEQUENCE;

/**
 * @author salmanoe
 * @since Jan 30, 2023
 */
@Getter
@Setter
@Entity
@Table(name = "sdm_komponengaji_m")
public class KomponenGaji implements Serializable {

	@Id
	@SequenceGenerator(name = "sdm_komponengaji_m_gen", sequenceName = "public.sdm_komponengaji_m_id_seq", allocationSize = 1)
	@GeneratedValue(strategy = SEQUENCE, generator = "sdm_komponengaji_m_gen")
	@Caption(value = "ID")
	protected Integer id;

	@Column(name = "namakomponen", nullable = false)
	@NotNull(message = "Nama komponen tidak boleh kosong")
	@Caption(value = "Nama Komponen")
	private String namaKomponen;

	/**
	 * 1-Gaji, 2-Remunerasi, 3-Uang Makan, 4-Potongan Gaji, 5-Potongan
	 * Remunerasi, 6-Potongan Uang Makan
	 */
	@Column(name = "jeniskomponen")
	@Caption(value = "Jenis Komponen")
	private Integer jenisKomponen;

	@Column(name = "urutan")
	@Caption(value = "Urutan")
	private Integer urutan;

}
