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;

@Getter
@Setter
@Entity
@Table(name = "sdm_DetailUraianTugasTransaksi_T")
public class DetailUraianTugasTransaksi extends BaseTransaction {

	@ManyToOne
	@JoinColumn(name = "ObjectUraianTugasTransaksiFk")
	@Caption(value = "Object UraianTugasTransaksi")
	private UraianTugasTransaksi uraianTugasTransaksi;

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

	@ManyToOne
	@JoinColumn(name = "ObjectRincianTugasFk")
	@Caption(value = "Object Rincian Tugas")
	private RincianKegiatan rincianKegiatan;

	@Column(name = "ObjectRincianTugasFk", insertable = false, updatable = false)
	private Integer rincianKegiatanId;

	@Caption(value = "Capaian")
	@NotNull(message = "Capaian  tidak boleh kosong")
	@Column(name = "capaian")
	private Double capaian;

	@Caption(value = "Tanggal")
	@NotNull(message = "Tanggal  tidak boleh kosong")
	@Column(name = "tanggal")
	private Date tanggal;

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

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

	@Caption(value = "Jam Awal Kegiatan")
	@Column(name = "jamawalkegiatan")
	private String jamAwalKegiatan;

	@Caption(value = "Jam Akhir Kegiatan")
	@Column(name = "jamakhirkegiatan")
	private String jamAkhirKegiatan;

	@Caption(value = "Lama Kegiatan")
	@Column(name = "lamakegiatan")
	private Integer lamaKegiatan;

}
