package com.jasamedika.medifirst2000.entities;

import java.util.Date;

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

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

/**
 * @author salmanoe
 * @since Dec 21, 2021
 */
@Entity
@Table(name = "sdm_targetskordokter_t")
public class TargetSkorDokter extends BaseTransaction {

	private static final long serialVersionUID = -8292175982556567518L;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "objectunitkerjafk")
	@NotNull(message = "Unit kerja harus diisi")
	@Caption(value = "Unit Kerja")
	private UnitKerjaPegawai unitKerjaPegawai;

	@Column(name = "objectunitkerjafk", insertable = false, updatable = false, nullable = false)
	private Integer unitKerjaPegawaiId;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "objectsubunitkerjafk")
	@NotNull(message = "Subunit kerja harus diisi")
	@Caption(value = "Subunit Kerja")
	private SubUnitKerjaPegawai subUnitKerjaPegawai;

	@Column(name = "objectsubunitkerjafk", insertable = false, updatable = false, nullable = false)
	private Integer subUnitKerjaPegawaiId;

	@Column(name = "tglhitung", nullable = false)
	@Temporal(TemporalType.TIMESTAMP)
	@NotNull(message = "Tanggal hitung harus diisi")
	@Caption(value = "Tanggal Hitung")
	private Date tglHitung;

	@Column(name = "tmt", nullable = false)
	@Temporal(TemporalType.DATE)
	@NotNull(message = "TMT harus diisi")
	@Caption(value = "TMT")
	private Date tmt;

	@Column(name = "totalskordasar", nullable = false)
	@NotNull(message = "Total skor dasar harus diisi")
	@Caption(value = "Total Skor Dasar")
	private Double totalSkorDasar;

	public UnitKerjaPegawai getUnitKerjaPegawai() {
		return unitKerjaPegawai;
	}

	public void setUnitKerjaPegawai(UnitKerjaPegawai unitKerjaPegawai) {
		this.unitKerjaPegawai = unitKerjaPegawai;
	}

	public Integer getUnitKerjaPegawaiId() {
		return unitKerjaPegawaiId;
	}

	public void setUnitKerjaPegawaiId(Integer unitKerjaPegawaiId) {
		this.unitKerjaPegawaiId = unitKerjaPegawaiId;
	}

	public SubUnitKerjaPegawai getSubUnitKerjaPegawai() {
		return subUnitKerjaPegawai;
	}

	public void setSubUnitKerjaPegawai(SubUnitKerjaPegawai subUnitKerjaPegawai) {
		this.subUnitKerjaPegawai = subUnitKerjaPegawai;
	}

	public Integer getSubUnitKerjaPegawaiId() {
		return subUnitKerjaPegawaiId;
	}

	public void setSubUnitKerjaPegawaiId(Integer subUnitKerjaPegawaiId) {
		this.subUnitKerjaPegawaiId = subUnitKerjaPegawaiId;
	}

	public Date getTglHitung() {
		return tglHitung;
	}

	public void setTglHitung(Date tglHitung) {
		this.tglHitung = tglHitung;
	}

	public Date getTmt() {
		return tmt;
	}

	public void setTmt(Date tmt) {
		this.tmt = tmt;
	}

	public Double getTotalSkorDasar() {
		return totalSkorDasar;
	}

	public void setTotalSkorDasar(Double totalSkorDasar) {
		this.totalSkorDasar = totalSkorDasar;
	}

}
