package com.jasamedika.medifirst2000.entities;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import com.jasamedika.medifirst2000.base.BaseTransaction;
import com.jasamedika.medifirst2000.helper.Caption;

/**
 * @author salmanoe
 * @since Jul 6, 2022
 *
 */
@Entity
@Table(name = "sdm_penilaiankinerjadetail_t")
public class PenilaianKinerjaDetail extends BaseTransaction {

	private static final long serialVersionUID = 3594531795669754275L;

	@Caption("Penilaian Kinerja")
	@NotNull(message = "Penilaian kinerja wajib diisi")
	@ManyToOne
	@JoinColumn(name = "penilaiankinerjafk")
	private PenilaianKinerja penilaianKinerja;

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

	@Caption("Jenis Indikator")
	@NotNull(message = "Jenis indikator wajib diisi")
	@Column(name = "jenisindikatorid", nullable = false)
	private Short jenisIndikatorId;

	@Caption("Indikator Kinerja")
	@NotNull(message = "Indikator kinerja wajib diisi")
	@ManyToOne
	@JoinColumn(name = "indikatorkinerjafk")
	private IndikatorKinerja indikatorKinerja;

	@Column(name = "indikatorkinerjafk", insertable = false, updatable = false, nullable = false)
	private Integer indikatorKinerjaId;

	@Caption("Bobot")
	@NotNull(message = "Bobot wajib diisi")
	@Column(name = "bobot", nullable = false)
	private Integer bobot;

	@Caption("Target")
	@NotNull(message = "Target wajib diisi")
	@Column(name = "target", nullable = false)
	private Double target;

	@Caption("Realisasi")
	@NotNull(message = "Realisasi wajib diisi")
	@Column(name = "realisasi", nullable = false)
	private Double realisasi;

	@Caption("Satuan")
	@NotNull(message = "Satuan wajib diisi")
	@ManyToOne
	@JoinColumn(name = "satuanfk")
	private SatuanIndikator satuan;

	@Column(name = "satuanfk", insertable = false, updatable = false, nullable = false)
	private Integer satuanId;

	@Caption("Nilai")
	@NotNull(message = "Nilai wajib diisi")
	@Column(name = "nilai", nullable = false)
	private Double nilai;

	@Caption("Hasil")
	@NotNull(message = "Hasil wajib diisi")
	@Column(name = "hasil", nullable = false)
	private Double hasil;

	public PenilaianKinerja getPenilaianKinerja() {
		return penilaianKinerja;
	}

	public void setPenilaianKinerja(PenilaianKinerja penilaianKinerja) {
		this.penilaianKinerja = penilaianKinerja;
	}

	public String getPenilaianKinerjaId() {
		return penilaianKinerjaId;
	}

	public void setPenilaianKinerjaId(String penilaianKinerjaId) {
		this.penilaianKinerjaId = penilaianKinerjaId;
	}

	public Short getJenisIndikatorId() {
		return jenisIndikatorId;
	}

	public void setJenisIndikatorId(Short jenisIndikatorId) {
		this.jenisIndikatorId = jenisIndikatorId;
	}

	public IndikatorKinerja getIndikatorKinerja() {
		return indikatorKinerja;
	}

	public void setIndikatorKinerja(IndikatorKinerja indikatorKinerja) {
		this.indikatorKinerja = indikatorKinerja;
	}

	public Integer getIndikatorKinerjaId() {
		return indikatorKinerjaId;
	}

	public void setIndikatorKinerjaId(Integer indikatorKinerjaId) {
		this.indikatorKinerjaId = indikatorKinerjaId;
	}

	public Integer getBobot() {
		return bobot;
	}

	public void setBobot(Integer bobot) {
		this.bobot = bobot;
	}

	public Double getTarget() {
		return target;
	}

	public void setTarget(Double target) {
		this.target = target;
	}

	public Double getRealisasi() {
		return realisasi;
	}

	public void setRealisasi(Double realisasi) {
		this.realisasi = realisasi;
	}

	public SatuanIndikator getSatuan() {
		return satuan;
	}

	public void setSatuan(SatuanIndikator satuan) {
		this.satuan = satuan;
	}

	public Integer getSatuanId() {
		return satuanId;
	}

	public void setSatuanId(Integer satuanId) {
		this.satuanId = satuanId;
	}

	public Double getNilai() {
		return nilai;
	}

	public void setNilai(Double nilai) {
		this.nilai = nilai;
	}

	public Double getHasil() {
		return hasil;
	}

	public void setHasil(Double hasil) {
		this.hasil = hasil;
	}

}
