package com.jasamedika.medifirst2000.entities;

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

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.util.Date;

@Getter
@Setter
@Entity
@Table(name = "sdm_anggaranremunerasi_t")
public class AnggaranRemunerasi extends BaseTransaction {

	@Caption(value = "Tahun")
	@Column(name = "tahun", nullable = false)
	@Temporal(TemporalType.DATE)
	private Date tahun;

	@Column(name = "totalnilaijabatan", nullable = false)
	@Caption(value = "Total Nilai Jabatan")
	private Long totalNilaiJabatan;

	@Column(name = "anggaranremuntahun", nullable = false)
	@Caption(value = "Anggaran Remunerasi Tahunan")
	private Double anggaranRemunTahun;

	@Column(name = "anggaranremunbulan", nullable = false)
	@Caption(value = "Anggaran Remun Bulanan")
	private Double anggaranRemunBulan;

	@Column(name = "poinindeksrupiah", nullable = false)
	@Caption(value = "Poin Indeks Rupiah")
	private Double poinIndeksRupiah;

	@ManyToOne
	@NotNull(message = "Grade Harus Diisi")
	@JoinColumn(name = "objectgradefk", nullable = false)
	@Caption(value = "Grade")
	private GradeRemunerasi grade;

	@Column(name = "objectgradefk", insertable = false, updatable = false)
	private Integer gradeId;

	@Column(name = "gajihonorarium", nullable = false)
	@Caption(value = "Gaji Honorarium")
	private Double gajiHonorarium;

	@Column(name = "mininsentif", nullable = false)
	@Caption(value = "Minimal Insentif")
	private Double minInsentif;

	@Column(name = "maxinsentif", nullable = false)
	@Caption(value = "Maksimal Insentif")
	private Double maxInsentif;

	@Column(name = "maxtotalremunerasi", nullable = false)
	@Caption(value = "Maksimal Total Remunerasi")
	private Double maxTotalRemunerasi;

	@Caption(value = "Tanggal Pembaharuan Data")
	@Column(name = "tanggalpembaharuandata", nullable = false)
	@Temporal(TemporalType.TIMESTAMP)
	private Date tanggalPembaharuanData;

}
