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;

@Entity
@Table(name = "sdm_logbookkinerjadokter_t")
public class LogbookKinerjaDokter extends BaseTransaction {

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

	@Caption(value = "Detail Target")
	@Column(name = "detailtarget", nullable = false)
	private Double detailTarget;

	@Caption(value = "Detail Capaian")
	@Column(name = "detailcapaian", nullable = true, columnDefinition = "float8 default 0")
	private Double detailCapaian;

	@ManyToOne(fetch = FetchType.LAZY)
	@NotNull(message = "Pegawai tidak boleh kosong")
	@JoinColumn(name = "objectpegawaifk")
	@Caption(value = "Pegawai")
	private Pegawai pegawai;

	@Column(name = "objectpegawaifk", insertable = false, updatable = false, nullable = true)
	private Integer pegawaiId;

	@ManyToOne(fetch = FetchType.LAZY)
	@NotNull(message = "Jabatan tidak boleh kosong")
	@JoinColumn(name = "objectjabatanfk")
	@Caption(value = "Jabatan")
	private Jabatan jabatan;

	@Column(name = "objectjabatanfk", insertable = false, updatable = false, nullable = true)
	private Integer jabatanId;

	@ManyToOne(fetch = FetchType.LAZY)
	@NotNull(message = "Indikator kinerja detail tidak boleh kosong")
	@JoinColumn(name = "objectindikatordetailfk")
	@Caption(value = "Indikator Kinerja Detail")
	private IndikatorKinerjaDetail indikatorDetail;

	@Column(name = "objectindikatordetailfk", insertable = false, updatable = false, nullable = true)
	private Integer indikatorDetailId;
	
	@Column(name = "tglhitung")
	@Temporal(TemporalType.TIMESTAMP)
	@Caption(value = "Tanggal Hitung")
	public Date tglHitung;

	public Date getBulan() {
		return bulan;
	}

	public void setBulan(Date bulan) {
		this.bulan = bulan;
	}

	public Double getDetailTarget() {
		return detailTarget;
	}

	public void setDetailTarget(Double detailTarget) {
		this.detailTarget = detailTarget;
	}

	public Double getDetailCapaian() {
		return detailCapaian;
	}

	public void setDetailCapaian(Double detailCapaian) {
		this.detailCapaian = detailCapaian;
	}

	public Pegawai getPegawai() {
		return pegawai;
	}

	public void setPegawai(Pegawai pegawai) {
		this.pegawai = pegawai;
	}

	public Integer getPegawaiId() {
		return pegawaiId;
	}

	public void setPegawaiId(Integer pegawaiId) {
		this.pegawaiId = pegawaiId;
	}

	public Jabatan getJabatan() {
		return jabatan;
	}

	public void setJabatan(Jabatan jabatan) {
		this.jabatan = jabatan;
	}

	public Integer getJabatanId() {
		return jabatanId;
	}

	public void setJabatanId(Integer jabatanId) {
		this.jabatanId = jabatanId;
	}

	public IndikatorKinerjaDetail getIndikatorDetail() {
		return indikatorDetail;
	}

	public void setIndikatorDetail(IndikatorKinerjaDetail indikatorDetail) {
		this.indikatorDetail = indikatorDetail;
	}

	public Integer getIndikatorDetailId() {
		return indikatorDetailId;
	}

	public void setIndikatorDetailId(Integer indikatorDetailId) {
		this.indikatorDetailId = indikatorDetailId;
	}

	public Date getTglHitung() {
		return tglHitung;
	}

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

}
