package com.jasamedika.medifirst2000.entities;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
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_logbookkinerjadetail_t")
public class LogbookKinerjaDetail extends BaseTransaction {

	private static final long serialVersionUID = -7534794958436007877L;

	@Column(name = "namakegiatan", nullable = false)
	@Caption(value = "Nama Kegiatan")
	private String namaKegiatan;

	@Column(name = "capaian", nullable = false)
	@Caption(value = "Capaian")
	private Double capaian;

	@Column(name = "catatan", nullable = true)
	@Caption(value = "Catatan")
	private String catatan;

	@Column(name = "tanggalkegiatan", nullable = false)
	@Caption(value = "Tanggal Kegiatan")
	@Temporal(TemporalType.TIMESTAMP)
	private Date tanggalKegiatan;

	@Column(name = "statusverifikasi", nullable = false)
	@Caption(value = "Status Verifikasi")
	private Boolean statusVerifikasi;

	@ManyToOne
	@NotNull(message = "Indikator kinerja tidak boleh kosong")
	@JoinColumn(name = "objectlogbookkinerjafk")
	@Caption(value = "Logbook Kinerja")
	private LogbookKinerja logbookKinerja;

	@Column(name = "objectlogbookkinerjafk", columnDefinition = "CHAR(32)", insertable = false, updatable = false, nullable = true)
	private String logbookKinerjaId;

	public String getNamaKegiatan() {
		return namaKegiatan;
	}

	public void setNamaKegiatan(String namaKegiatan) {
		this.namaKegiatan = namaKegiatan;
	}

	public Double getCapaian() {
		return capaian;
	}

	public void setCapaian(Double capaian) {
		this.capaian = capaian;
	}

	public String getCatatan() {
		return catatan;
	}

	public void setCatatan(String catatan) {
		this.catatan = catatan;
	}

	public Date getTanggalKegiatan() {
		return tanggalKegiatan;
	}

	public void setTanggalKegiatan(Date tanggalKegiatan) {
		this.tanggalKegiatan = tanggalKegiatan;
	}

	public Boolean getStatusVerifikasi() {
		return statusVerifikasi;
	}

	public void setStatusVerifikasi(Boolean statusVerifikasi) {
		this.statusVerifikasi = statusVerifikasi;
	}

	public LogbookKinerja getLogbookKinerja() {
		return logbookKinerja;
	}

	public void setLogbookKinerja(LogbookKinerja logbookKinerja) {
		this.logbookKinerja = logbookKinerja;
	}

	public String getLogbookKinerjaId() {
		return logbookKinerjaId;
	}

	public void setLogbookKinerjaId(String logbookKinerjaId) {
		this.logbookKinerjaId = logbookKinerjaId;
	}

}
