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;

import static javax.persistence.FetchType.LAZY;

@Getter
@Setter
@Entity
@Table(name = "IkiDanRemunerasi_T")
public class IkiDanRemunerasi extends BaseTransaction {

	@ManyToOne(fetch = LAZY)
	@JoinColumn(name = "ObjectEvaluasiJabatanFk")
	@Caption(value = "Object Evaluasi Jabatan")
	private EvaluasiJabatan evaluasiJabatan;

	@Column(name = "ObjectEvaluasiJabatanFk", columnDefinition = "CHAR(32)", insertable = false, updatable = false)
	private String evaluasiJabatanId;

	@Column(name = "NilaiJabatan")
	@Caption(value = "NilaiJabatan")
	private Double nilaiJabatan;

	@Column(name = "Gaji")
	@Caption(value = "Gaji")
	private Double gaji;

	@Column(name = "Grade")
	@Caption(value = "Grade")
	private String grade;

	@Column(name = "Iku")
	@Caption(value = "Iku")
	private Double iku;

	@Column(name = "Iki")
	@Caption(value = "Iki")
	private Double iki;

	@Column(name = "Pir")
	@Caption(value = "Pir")
	private Double pir;

	@Column(name = "P1")
	@Caption(value = "P1")
	private Double p1;

	@Column(name = "P2")
	@Caption(value = "P2")
	private Double p2;

	@Column(name = "P1Rp")
	@Caption(value = "P1Rp")
	private Double p1Rp;

	@Column(name = "P2Rp")
	@Caption(value = "P2Rp")
	private Double p2Rp;

	@Column(name = "Tanggal")
	@Caption(value = "Tanggal")
	private Date tanggal;

	@Column(name = "IndekKehadiran")
	@Caption(value = "IndekKehadiran")
	private Integer indekKehadiran;

	@Column(name = "Remunerasi")
	@Caption(value = "Remunerasi")
	private Double remunerasi;

	@Column(name = "Periode")
	@Caption(value = "Periode")
	private String periode;

	@ManyToOne(fetch = LAZY)
	@JoinColumn(name = "ObjectPegawaiFk")
	@Caption(value = "Object Pegawai")
	private Pegawai pegawai;

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

	@ManyToOne
	@JoinColumn(name = "noHistoriFK")
	@NotNull(message = "noHistori Harus Diisi")
	@Caption(value = "noHistori")
	private StrukHistori strukHistory;

	@Column(name = "noHistoriFK", columnDefinition = "CHAR(32)", insertable = false, updatable = false, nullable = false)
	private String strukHistoryId;

}
