package com.jasamedika.medifirst2000.entities;

import java.math.BigDecimal;

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.validation.constraints.NotNull;

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

@Entity
@Table(name="PegawaiHistoriRekap_T")
public class PegawaiHistoriRekap extends BaseTransaction{

	@ManyToOne
	@JoinColumn(name = "noHistoriFK")
	@NotNull(message = "noHistori Harus Diisi")
	@Caption(value = "noHistori")
	private StrukHistori strukHistory;
	
	@Column(name = "noHistoriFK", columnDefinition = "CHAR(32)", insertable = false, updatable = false)
	private String strukHistoryId;
		
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name = "ObjectPegawaiFk")
	@Caption(value="Object Pegawai")
	private Pegawai pegawai;

	@Column(name = "ObjectPegawaiFk", insertable=false,updatable=false)
	private Integer pegawaiId;
	
	@Column(name = "TotalNilaiIndex")
	@Caption(value="Total Nilai Index")
	private Double totalNilaiIndex;
	
	@Column(name = "periode")
	@Caption(value="periode")
	private String periode;
	
	@Column(name = "TotalHargaIndex")
	@Caption(value="Total Harga Index")
	private Double totalHargaIndex;
	
	@ManyToOne
	@JoinColumn(name = "strukVerifikasiFK")
	@Caption(value = "strukVerifikasi")
	private StrukVerifikasi strukVerifikasi;
	
	@Column(name = "strukVerifikasiFK", columnDefinition = "CHAR(32)", insertable = false, updatable = false,nullable = true)
	private String strukVerifikasiId;
	
	@Column(name = "TotalHargaGajiAdd", updatable = false)
	private BigDecimal totalHargaGajiAdd = new BigDecimal(0);
	
	@Column(name = "TotalHargaGajiMin", updatable = false)
	private BigDecimal totalHargaGajiMin = new BigDecimal(0);
	
	@ManyToOne
	@JoinColumn(name = "noStrukPelayananFK", nullable = true)
	@Caption(value = "noStrukPelayanan")
	private StrukPelayanan noStrukPelayanan;
	
	@Column(name = "noStrukPelayananFK", columnDefinition = "CHAR(32)", insertable = false, updatable = false,nullable = false)
	private String noStrukPelayananId;
	
	public StrukPelayanan getNoStrukPelayanan() {
		return noStrukPelayanan;
	}

	public void setNoStrukPelayanan(StrukPelayanan noStrukPelayanan) {
		this.noStrukPelayanan = noStrukPelayanan;
	}

	public String getNoStrukPelayananId() {
		return noStrukPelayananId;
	}

	public void setNoStrukPelayananId(String noStrukPelayananId) {
		this.noStrukPelayananId = noStrukPelayananId;
	}

	public StrukHistori getStrukHistory() {
		return strukHistory;
	}

	public void setStrukHistory(StrukHistori strukHistory) {
		this.strukHistory = strukHistory;
	}

	public String getStrukHistoryId() {
		return strukHistoryId;
	}

	public void setStrukHistoryId(String strukHistoryId) {
		this.strukHistoryId = strukHistoryId;
	}

	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 Double getTotalNilaiIndex() {
		return totalNilaiIndex;
	}

	public void setTotalNilaiIndex(Double totalNilaiIndex) {
		this.totalNilaiIndex = totalNilaiIndex;
	}

	public Double getTotalHargaIndex() {
		return totalHargaIndex;
	}

	public void setTotalHargaIndex(Double totalHargaIndex) {
		this.totalHargaIndex = totalHargaIndex;
	}

	public StrukVerifikasi getStrukVerifikasi() {
		return strukVerifikasi;
	}

	public void setStrukVerifikasi(StrukVerifikasi strukVerifikasi) {
		this.strukVerifikasi = strukVerifikasi;
	}

	public String getStrukVerifikasiId() {
		return strukVerifikasiId;
	}

	public void setStrukVerifikasiId(String strukVerifikasiId) {
		this.strukVerifikasiId = strukVerifikasiId;
	}

	public BigDecimal getTotalHargaGajiAdd() {
		return totalHargaGajiAdd;
	}

	public void setTotalHargaGajiAdd(BigDecimal totalHargaGajiAdd) {
		this.totalHargaGajiAdd = totalHargaGajiAdd;
	}

	public BigDecimal getTotalHargaGajiMin() {
		return totalHargaGajiMin;
	}

	public void setTotalHargaGajiMin(BigDecimal totalHargaGajiMin) {
		this.totalHargaGajiMin = totalHargaGajiMin;
	}

	public String getPeriode() {
		return periode;
	}

	public void setPeriode(String periode) {
		this.periode = periode;
	}
	
}
