package com.jasamedika.medifirst2000.entities;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonManagedReference;
import com.jasamedika.medifirst2000.base.BaseTransaction;
import com.jasamedika.medifirst2000.helper.Caption;

@Entity
@Table(name = "StrukHistori_T")
public class StrukHistori extends BaseTransaction {

	@Column(name = "NonHistori", length = 100)
	@Caption(value = "Non Histori")
	private String nonHistori;

	@Column(name = "TglHistori")
	@Caption(value = "Tgl Histori")
	private Date tglHistori;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectRuanganFk")
	@Caption(value = "Object Ruangan")
	private Ruangan ruangan;
	
	@Column(name = "ObjectRuanganFk", insertable = false, updatable = false)
	private Integer ruanganId;
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectProdukHasilFk")
	@Caption(value = "Object Produk Hasil")
	private Produk produkHasil;
	
	@Column(name = "ObjectProdukHasilFk", insertable = false, updatable = false)
	private Integer produkHasilId;

	@Column(name = "TglAwal")
	@Caption(value = "Tgl Awal")
	private Date tglAwal;
	
	@Column(name = "qtyProduk")
	@Caption(value = "qty Produk")
	private Double qtyProduk;

	@Column(name = "TglAhir")
	@Caption(value = "Tgl Ahir")
	private Date tglAhir;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectKelompokTransaksiFk")
	@Caption(value = "Object Kelompok Transaksi")
	private KelompokTransaksi kelompokTransaksi;

	@Column(name = "ObjectKelompokTransaksiFk", insertable = false, updatable = false)
	private Integer kelompokTransaksiId;
	
	@ManyToOne
	@JoinColumn(name = "jenisgajifk")
	@Caption(value = "Jenis Gaji")
	private JenisGaji jenisGaji;

	@Column(name = "jenisgajifk", insertable = false, updatable = false)
	private Integer jenisGajiId;
	
	@ManyToOne
	@JoinColumn(name = "ObjectBankAccountFk")
	@Caption(value = "Bank Account")
	private BankAccount bankAccount;

	@Column(name = "ObjectBankAccountFk", insertable = false, updatable = false)
	private Integer bankAccountId;
	
	@Column(name = "TotalSetorTarikDeposit")
	@Caption(value = "Total Setor Tarik Deposit")
	private Float totalSetorTarikDeposit;
	
	@Column(name = "TotalAdminSetorTarikDeposit")
	@Caption(value = "Total Admin Setor Tarik Deposit")
	private Float totalAdminSetorTarikDeposit;
	
	@Column(name = "TglSetorTarikDeposit")
	@Caption(value = "tgl Setor Tarik Deposit")
	private Date tglSetorTarikDeposit;
	
	@ManyToOne
	@JoinColumn(name = "ObjectPegawaiTarikDepositFk")
	@Caption(value = "Object Pegawai Tarik Deposit Fk")
	private Pegawai pegawaiTarikDeposit;

	@Column(name = "ObjectPegawaiTarikDepositFk", insertable = false, updatable = false)
	private Integer pegawaiTarikDepositId;
	
	@Column(name = "SetoranTarikanDepositKe")
	@Caption(value = "Setoran Tarikan Deposit Ke")
	private Integer setoranTarikanDepositKe;
	
	@Column(name = "NoHistoriBefore")
	@Caption(value = "No Histori Before")
	private Integer noHistoriBefore;
	
	@ManyToOne
	@JoinColumn(name = "ObjectPegawaiTerimaFk")
	@Caption(value = "Object Pegawai Terima Fk")
	private Pegawai pegawaiTerima;

	@Column(name = "ObjectPegawaiTerimaFk", insertable = false, updatable = false)
	private Integer pegawaiTerimaId;
	
	@ManyToOne
	@JoinColumn(name = "ObjectRuanganTerimaFk")
	@Caption(value = "Object Ruangan Terima Fk")
	private Ruangan ruanganTerima;

	@Column(name = "ObjectRuanganTerimaFk", insertable = false, updatable = false)
	private Integer ruanganTerimaId;
	
	@Column(name = "NoStrukTextHasil")
	@Caption(value = "No Struk Text Hasil")
	private Integer noStrukTextHasil;
	
	@ManyToOne
	@JoinColumn(name = "ObjectAsalProdukHasilFk")
	@Caption(value = "Object Asal Produk Hasil Fk")
	private AsalProduk asalProdukHasil;

	@Column(name = "ObjectAsalProdukHasilFk", insertable = false, updatable = false)
	private Integer asalProdukHasilId;
	
	@Column(name = "TglBerlakuAwal")
	@Caption(value = "Tgl Berlaku Awal")
	private Date tglBerlakuAwal;
	
	@Column(name = "KetAlasan")
	@Caption(value = "Ket Alasan")
	private String ketAlasan;
	
	@Column(name = "KetLainya")
	@Caption(value = "Ket Lainya")
	private String ketLainya;
	
	@Column(name = "NoClosing")
	@Caption(value = "No Closing")
	private String noClosing;
	
	@Column(name = "NoVerifikasi")
	@Caption(value = "NoVerifikasi")
	private String noVerifikasi;
	
	@Column(name = "NoUrutLogin")
	@Caption(value = "No Urut Login")
	private String noUrutLogin;
	
	@Column(name = "NoUrutRuangan")
	@Caption(value = "No Urut Ruangan")
	private String noUrutRuangan;
	
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "strukHistory")
	private Set<DestroyProduk> destroyProduk = new HashSet<DestroyProduk>();

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "strukHistory")
	private Set<DestroyProdukDetail> destroyProdukDetail = new HashSet<DestroyProdukDetail>();

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "strukHistory")
	private Set<DestroyProdukPetugas> destroyProdukPetugas = new HashSet<DestroyProdukPetugas>();

	@JsonManagedReference
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "strukHistory")
	private Set<PegawaiHistoriEvaluasiKomponen> pegawaiHistoriEvaluasiKomponen = new HashSet<PegawaiHistoriEvaluasiKomponen>();

	@JsonManagedReference
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "strukHistory")
	private Set<PegawaiHistoriEvaluasi> pegawaiHistoriEvaluasi = new HashSet<PegawaiHistoriEvaluasi>();

	@JsonManagedReference
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "strukHistory")
	private Set<PegawaiHistoriRekap> pegawaiHistoriRekap = new HashSet<PegawaiHistoriRekap>();

	@JsonManagedReference
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "strukHistory")
	private Set<PegawaiHistoriRekapIndex> pegawaiHistoriRekapIndex = new HashSet<PegawaiHistoriRekapIndex>();

	@JsonManagedReference
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "strukHistory")
	private Set<IkiDanRemunerasi> ikiDanRemunerasi = new HashSet<IkiDanRemunerasi>();
	
	@JsonManagedReference
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "strukHistory")
	private Set<PegawaiHistoriRekapGaji> rekapGaji = new HashSet<PegawaiHistoriRekapGaji>();

	public String getNonHistori() {
		return nonHistori;
	}

	public void setNonHistori(String nonHistori) {
		this.nonHistori = nonHistori;
	}

	public Date getTglHistori() {
		return tglHistori;
	}

	public void setTglHistori(Date tglHistori) {
		this.tglHistori = tglHistori;
	}

	public Ruangan getRuangan() {
		return ruangan;
	}

	public void setRuangan(Ruangan ruangan) {
		this.ruangan = ruangan;
	}

	public Integer getRuanganId() {
		return ruanganId;
	}

	public void setRuanganId(Integer ruanganId) {
		this.ruanganId = ruanganId;
	}

	public Date getTglAwal() {
		return tglAwal;
	}

	public void setTglAwal(Date tglAwal) {
		this.tglAwal = tglAwal;
	}

	public Date getTglAhir() {
		return tglAhir;
	}

	public void setTglAhir(Date tglAhir) {
		this.tglAhir = tglAhir;
	}

	public KelompokTransaksi getKelompokTransaksi() {
		return kelompokTransaksi;
	}

	public void setKelompokTransaksi(KelompokTransaksi kelompokTransaksi) {
		this.kelompokTransaksi = kelompokTransaksi;
	}

	public Integer getKelompokTransaksiId() {
		return kelompokTransaksiId;
	}

	public void setKelompokTransaksiId(Integer kelompokTransaksiId) {
		this.kelompokTransaksiId = kelompokTransaksiId;
	}

	public JenisGaji getJenisGaji() {
		return jenisGaji;
	}

	public void setJenisGaji(JenisGaji jenisGaji) {
		this.jenisGaji = jenisGaji;
	}

	public Integer getJenisGajiId() {
		return jenisGajiId;
	}

	public void setJenisGajiId(Integer jenisGajiId) {
		this.jenisGajiId = jenisGajiId;
	}

	public BankAccount getBankAccount() {
		return bankAccount;
	}

	public void setBankAccount(BankAccount bankAccount) {
		this.bankAccount = bankAccount;
	}

	public Integer getBankAccountId() {
		return bankAccountId;
	}

	public void setBankAccountId(Integer bankAccountId) {
		this.bankAccountId = bankAccountId;
	}

	public Float getTotalSetorTarikDeposit() {
		return totalSetorTarikDeposit;
	}

	public void setTotalSetorTarikDeposit(Float totalSetorTarikDeposit) {
		this.totalSetorTarikDeposit = totalSetorTarikDeposit;
	}

	public Float getTotalAdminSetorTarikDeposit() {
		return totalAdminSetorTarikDeposit;
	}

	public void setTotalAdminSetorTarikDeposit(Float totalAdminSetorTarikDeposit) {
		this.totalAdminSetorTarikDeposit = totalAdminSetorTarikDeposit;
	}

	public Date getTglSetorTarikDeposit() {
		return tglSetorTarikDeposit;
	}

	public void setTglSetorTarikDeposit(Date tglSetorTarikDeposit) {
		this.tglSetorTarikDeposit = tglSetorTarikDeposit;
	}

	public Pegawai getPegawaiTarikDeposit() {
		return pegawaiTarikDeposit;
	}

	public void setPegawaiTarikDeposit(Pegawai pegawaiTarikDeposit) {
		this.pegawaiTarikDeposit = pegawaiTarikDeposit;
	}

	public Integer getPegawaiTarikDepositId() {
		return pegawaiTarikDepositId;
	}

	public void setPegawaiTarikDepositId(Integer pegawaiTarikDepositId) {
		this.pegawaiTarikDepositId = pegawaiTarikDepositId;
	}

	public Integer getSetoranTarikanDepositKe() {
		return setoranTarikanDepositKe;
	}

	public void setSetoranTarikanDepositKe(Integer setoranTarikanDepositKe) {
		this.setoranTarikanDepositKe = setoranTarikanDepositKe;
	}

	public Integer getNoHistoriBefore() {
		return noHistoriBefore;
	}

	public void setNoHistoriBefore(Integer noHistoriBefore) {
		this.noHistoriBefore = noHistoriBefore;
	}

	public Pegawai getPegawaiTerima() {
		return pegawaiTerima;
	}

	public void setPegawaiTerima(Pegawai pegawaiTerima) {
		this.pegawaiTerima = pegawaiTerima;
	}

	public Integer getPegawaiTerimaId() {
		return pegawaiTerimaId;
	}

	public void setPegawaiTerimaId(Integer pegawaiTerimaId) {
		this.pegawaiTerimaId = pegawaiTerimaId;
	}

	public Ruangan getRuanganTerima() {
		return ruanganTerima;
	}

	public void setRuanganTerima(Ruangan ruanganTerima) {
		this.ruanganTerima = ruanganTerima;
	}

	public Integer getRuanganTerimaId() {
		return ruanganTerimaId;
	}

	public void setRuanganTerimaId(Integer ruanganTerimaId) {
		this.ruanganTerimaId = ruanganTerimaId;
	}

	public Integer getNoStrukTextHasil() {
		return noStrukTextHasil;
	}

	public void setNoStrukTextHasil(Integer noStrukTextHasil) {
		this.noStrukTextHasil = noStrukTextHasil;
	}

	public AsalProduk getAsalProdukHasil() {
		return asalProdukHasil;
	}

	public void setAsalProdukHasil(AsalProduk asalProdukHasil) {
		this.asalProdukHasil = asalProdukHasil;
	}

	public Integer getAsalProdukHasilId() {
		return asalProdukHasilId;
	}

	public void setAsalProdukHasilId(Integer asalProdukHasilId) {
		this.asalProdukHasilId = asalProdukHasilId;
	}

	public Date getTglBerlakuAwal() {
		return tglBerlakuAwal;
	}

	public void setTglBerlakuAwal(Date tglBerlakuAwal) {
		this.tglBerlakuAwal = tglBerlakuAwal;
	}

	public String getKetAlasan() {
		return ketAlasan;
	}

	public void setKetAlasan(String ketAlasan) {
		this.ketAlasan = ketAlasan;
	}

	public String getKetLainya() {
		return ketLainya;
	}

	public void setKetLainya(String ketLainya) {
		this.ketLainya = ketLainya;
	}

	public String getNoClosing() {
		return noClosing;
	}

	public void setNoClosing(String noClosing) {
		this.noClosing = noClosing;
	}

	public String getNoVerifikasi() {
		return noVerifikasi;
	}

	public void setNoVerifikasi(String noVerifikasi) {
		this.noVerifikasi = noVerifikasi;
	}

	public String getNoUrutLogin() {
		return noUrutLogin;
	}

	public void setNoUrutLogin(String noUrutLogin) {
		this.noUrutLogin = noUrutLogin;
	}

	public String getNoUrutRuangan() {
		return noUrutRuangan;
	}

	public void setNoUrutRuangan(String noUrutRuangan) {
		this.noUrutRuangan = noUrutRuangan;
	}

	public Set<DestroyProduk> getDestroyProduk() {
		return destroyProduk;
	}

	public void setDestroyProduk(Set<DestroyProduk> destroyProduk) {
		this.destroyProduk = destroyProduk;
	}

	public Set<DestroyProdukDetail> getDestroyProdukDetail() {
		return destroyProdukDetail;
	}

	public void setDestroyProdukDetail(Set<DestroyProdukDetail> destroyProdukDetail) {
		this.destroyProdukDetail = destroyProdukDetail;
	}

	public Set<DestroyProdukPetugas> getDestroyProdukPetugas() {
		return destroyProdukPetugas;
	}

	public void setDestroyProdukPetugas(Set<DestroyProdukPetugas> destroyProdukPetugas) {
		this.destroyProdukPetugas = destroyProdukPetugas;
	}

	public Set<PegawaiHistoriEvaluasiKomponen> getPegawaiHistoriEvaluasiKomponen() {
		return pegawaiHistoriEvaluasiKomponen;
	}

	public void setPegawaiHistoriEvaluasiKomponen(Set<PegawaiHistoriEvaluasiKomponen> pegawaiHistoriEvaluasiKomponen) {
		this.pegawaiHistoriEvaluasiKomponen = pegawaiHistoriEvaluasiKomponen;
	}

	public Set<PegawaiHistoriEvaluasi> getPegawaiHistoriEvaluasi() {
		return pegawaiHistoriEvaluasi;
	}

	public void setPegawaiHistoriEvaluasi(Set<PegawaiHistoriEvaluasi> pegawaiHistoriEvaluasi) {
		this.pegawaiHistoriEvaluasi = pegawaiHistoriEvaluasi;
	}

	public Set<PegawaiHistoriRekap> getPegawaiHistoriRekap() {
		return pegawaiHistoriRekap;
	}

	public void setPegawaiHistoriRekap(Set<PegawaiHistoriRekap> pegawaiHistoriRekap) {
		this.pegawaiHistoriRekap = pegawaiHistoriRekap;
	}

	public Set<PegawaiHistoriRekapIndex> getPegawaiHistoriRekapIndex() {
		return pegawaiHistoriRekapIndex;
	}

	public void setPegawaiHistoriRekapIndex(Set<PegawaiHistoriRekapIndex> pegawaiHistoriRekapIndex) {
		this.pegawaiHistoriRekapIndex = pegawaiHistoriRekapIndex;
	}

	public Set<IkiDanRemunerasi> getIkiDanRemunerasi() {
		return ikiDanRemunerasi;
	}

	public void setIkiDanRemunerasi(Set<IkiDanRemunerasi> ikiDanRemunerasi) {
		this.ikiDanRemunerasi = ikiDanRemunerasi;
	}

	public Set<PegawaiHistoriRekapGaji> getRekapGaji() {
		return rekapGaji;
	}

	public void setRekapGaji(Set<PegawaiHistoriRekapGaji> rekapGaji) {
		this.rekapGaji = rekapGaji;
	}

	public Produk getProdukHasil() {
		return produkHasil;
	}

	public void setProdukHasil(Produk produkHasil) {
		this.produkHasil = produkHasil;
	}

	public Integer getProdukHasilId() {
		return produkHasilId;
	}

	public void setProdukHasilId(Integer produkHasilId) {
		this.produkHasilId = produkHasilId;
	}

	public Double getQtyProduk() {
		return qtyProduk;
	}

	public void setQtyProduk(Double qtyProduk) {
		this.qtyProduk = qtyProduk;
	}
	
	

}
