package com.jasamedika.medifirst2000.entities;

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

import javax.persistence.*;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;

/**
 * class StrukPelayanan
 * 
 * @author Generator
 */
@Getter
@Setter
@Entity
@Table(name = "StrukPelayanan_T")
public class StrukPelayanan extends BaseTransaction {
	private static final long serialVersionUID = 6847625638301719465L;

	@Column(name = "AlamatEmailRekanan", length = 50)
	@Caption(value = "Alamat Email Rekanan")
	private String alamatemailrekanan;

	@Column(name = "AlamatEmailRekananSales", length = 50)
	@Caption(value = "Alamat Email Rekanan Sales")
	private String alamatemailrekanansales;

	@Column(name = "noSppb", length = 100)
	@Caption(value = "No SPPB")
	private String noSppb;

	@Column(name = "noKontrak", length = 100)
	@Caption(value = "No Kontrak")
	private String noKontrak;

	@Column(name = "noTerima", length = 100)
	@Caption(value = "NO Terima")
	private String noTerima;

	@Column(name = "AlamatTempatTujuan", length = 150)
	@Caption(value = "Alamat Tempat Tujuan")
	private String alamattempattujuan;

	@Column(name = "isDelivered")
	@Caption(value = "Is Delivered")
	private Byte isdelivered;

	@Column(name = "isPickup")
	@Caption(value = "Is Pickup")
	private Byte ispickup;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectKamarLastFk")
	@Caption(value = "Object Kamar Last")
	private Kamar kdkamarlast;

	@Column(name = "ObjectKamarLastFk", insertable = false, updatable = false)
	private Integer ObjectKamarLastId;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectProsesSterilisasi")
	@Caption(value = "Cssd Proses Sterilisasi")
	private CssdProsesSterilisasi cssdProsesSterilisasi;

	@Column(name = "ObjectProsesSterilisasi", insertable = false, updatable = false)
	private Integer cssdProsesSterilisasiId;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectKelasKamarLastFk")
	@Caption(value = "Object Kelas Kamar Last")
	private DetailKamar kdkelaskamarlast;

	@Column(name = "ObjectKelasKamarLastFk", insertable = false, updatable = false)
	private Integer ObjectKelasKamarLastId;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectKelasLastFk")
	@Caption(value = "Object Kelas Last")
	private DetailKamar kdkelaslast;

	@Column(name = "ObjectKelasLastFk", insertable = false, updatable = false)
	private Integer ObjectKelasLastId;

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

	@Column(name = "ObjectKelompokTransaksiFk", insertable = false, updatable = false)
	private Integer ObjectKelompokTransaksiId;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectMetodeDeliveryFk")
	@Caption(value = "Object Metode Delivery")
	private MetodeDelivery kdmetodedelivery;

	@Column(name = "ObjectMetodeDeliveryFk", insertable = false, updatable = false)
	private Integer ObjectMetodeDeliveryId;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectPegawaiPenerimaFk")
	@Caption(value = "Object Pegawai Penerima")
	private Pegawai kdpegawaipenerima;

	@Column(name = "ObjectPegawaiPenerimaFk", insertable = false, updatable = false)
	private Integer ObjectPegawaiPenerimaId;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectRekananFk")
	@Caption(value = "Object Rekanan")
	private Rekanan kdrekanan;

	@Column(name = "ObjectRekananFk", insertable = false, updatable = false)
	private Integer ObjectRekananId;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectRekananSalesFk")
	@Caption(value = "Object Rekanan Sales")
	private Rekanan kdrekanansales;

	@Column(name = "ObjectRekananSalesFk", insertable = false, updatable = false)
	private Integer ObjectRekananSalesId;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectRuanganFk")
	@Caption(value = "Object Ruangan")
	private Ruangan kdruangan;

	@Column(name = "ObjectRuanganFk", insertable = false, updatable = false)
	private Integer ObjectRuanganId;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectRuanganAsalFk")
	@Caption(value = "Object Ruangan Asal")
	private Ruangan kdruanganasal;

	@Column(name = "ObjectRuanganAsalFk", insertable = false, updatable = false)
	private Integer ObjectRuanganAsalId;

	@Caption(value = "Keterangan Lainnya")
	@Column(name = "KeteranganLainnya", length = 150)
	private String keteranganlainnya;

	@Caption(value = "Nama Kurir Pengirim")
	@Column(name = "NamaKurirPengirim", length = 40)
	private String namakurirpengirim;

	@Caption(value = "Nama Pasien Klien")
	@Column(name = "NamaPasien_Klien", length = 40)
	private String namapasien_klien;

	@Caption(value = "Nama Pegawai Penerima")
	@Column(name = "NamaPegawaiPenerima", length = 100)
	private String namapegawaipenerima;

	@Caption(value = "Nama Rekanan")
	@Column(name = "NamaRekanan", length = 50)
	private String namarekanan;

	@Caption(value = "Nama Rekanan Sales")
	@Column(name = "NamaRekananSales", length = 40)
	private String namarekanansales;

	@Caption(value = "Nama Tempat Tujuan")
	@Column(name = "NamaTempatTujuan", length = 75)
	private String namatempattujuan;

	@Caption(value = "Nama User Faktur")
	@Column(name = "NamaUserFaktur", length = 40)
	private String namauserfaktur;

	@Caption(value = "No Bed Last")
	@Column(name = "NoBedLast")
	private Byte nobedlast;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "NoClosingFk")
	@Caption(value = "No Closing")
	private StrukClosing noclosing;

	@Column(name = "NoClosingFk", columnDefinition = "CHAR(32)", insertable = false, updatable = false)
	private String NoClosingId;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "NoCMFk")
	@Caption(value = "No C M")
	private Pasien nocm;

	@Column(name = "NoCMFk", insertable = false, updatable = false)
	private Integer NoCMId;

	@Caption(value = "No Faktur")
	@Column(name = "NoFaktur", length = 20)
	private String nofaktur;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "NoMasukFk")
	@Caption(value = "No Masuk")
	private RegistrasiPelayananPasien nomasuk;

	@Column(name = "NoMasukFk", columnDefinition = "CHAR(32)", insertable = false, updatable = false)
	private String NoMasukId;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "NoOrderFk")
	@Caption(value = "No Order")
	private StrukOrder noorder;

	@Column(name = "NoOrderFk", columnDefinition = "CHAR(32)", insertable = false, updatable = false)
	private String NoOrderId;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "NoPlanningFk")
	@Caption(value = "No Planning")
	private StrukPlanning noplanning;

	@Column(name = "NoPlanningFk", columnDefinition = "CHAR(32)", insertable = false, updatable = false)
	private String NoPlanningId;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "NoRegistrasiFk")
	@Caption(value = "No Registrasi")
	private PasienDaftar noregistrasi;

	@Column(name = "NoRegistrasiFk", columnDefinition = "CHAR(32)", insertable = false, updatable = false)
	private String NoRegistrasiId;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "NoSBKLastFk")
	@Caption(value = "No S B K Last")
	private StrukBuktiPengeluaran nosbklast;

	@Column(name = "NoSBKLastFk", columnDefinition = "CHAR(32)", insertable = false, updatable = false)
	private String NoSBKLastId;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "NoSBMLastFk")
	@Caption(value = "No S B M Last")
	private StrukBuktiPenerimaan nosbmlast;

	@Column(name = "NoSBMLastFk", columnDefinition = "CHAR(32)", insertable = false, updatable = false)
	private String NoSBMLastId;

	@Caption(value = "No Struk")
	@Column(name = "NoStruk", length = 100)
	private String nostruk;

	@Caption(value = "No Struk_ Intern")
	@Column(name = "NoStruk_Intern", length = 100)
	private String nostruk_intern;

	@Caption(value = "No Dokumen")
	@Column(name = "noDokumen", length = 100)
	private String noDokumen;

	@Caption(value = "No Dokumen")
	@Column(name = "tglDokumen", length = 100)
	private Date tglDokumen;

	@Caption(value = "No Dokumen")
	@Column(name = "noPesanan", length = 100)
	private String noPesanan;

	@Caption(value = "No Telepon Faks")
	@Column(name = "NoTeleponFaks", length = 30)
	private String noteleponfaks;

	@Caption(value = "No Telp Mobile Rekanan Sales")
	@Column(name = "NoTelpMobileRekananSales", length = 30)
	private String notelpmobilerekanansales;

	@Caption(value = "No Telp Mobile Tempat Tujuan")
	@Column(name = "NoTelpMobileTempatTujuan", length = 30)
	private String notelpmobiletempattujuan;

	@Caption(value = "No Urut Login")
	@Column(name = "NoUrutLogin", length = 10)
	private String nourutlogin;

	@Caption(value = "No Urut Ruangan")
	@Column(name = "NoUrutRuangan", length = 10)
	private String nourutruangan;

	@Caption(value = "No Urut")
	@Column(name = "noUrut")
	private Integer noUrut;

	@Caption(value = "Perusahaan Kurir")
	@Column(name = "PerusahaanKurir", length = 75)
	private String perusahaankurir;

	@Caption(value = "Qty Detail Jenis Produk")
	@Column(name = "QtyDetailJenisProduk")
	private Double qtydetailjenisproduk;

	@Caption(value = "Qty Orang Last")
	@Column(name = "QtyOrangLast")
	private Byte qtyoranglast;

	@Caption(value = "Qty Produk")
	@Column(name = "QtyProduk")
	private Double qtyproduk;

	@Caption(value = "Tanggal Faktur")
	@Column(name = "Tglfaktur")
	private Date tglfaktur;

	@Caption(value = "Tanggal Kontrak")
	@Column(name = "Tglkontrak")
	private Date tanggalKontrak;

	@Caption(value = "Tanggal Spk")
	@Column(name = "Tglspk")
	private Date tanggalSpk;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectPegawaiMengetahuiFk")
	@Caption(value = "Object Pegawai Mengetahui")
	private Pegawai mengetahui;

	@Column(name = "ObjectPegawaiMengetahuiFk", insertable = false, updatable = false)
	private Integer mengetahuiId;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectPegawaiPenanggungJawabFk")
	@Caption(value = "Object Pegawai Mengetahui")
	private Pegawai pjPenerima;

	@Column(name = "ObjectPegawaiPenanggungJawabFk", insertable = false, updatable = false)
	private Integer pjPenerimaId;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectPegawaiMenerimaFk")
	@Caption(value = "Object Pegawai Penerima")
	private Pegawai menerima;

	@Column(name = "ObjectPegawaiMenerimaFk", insertable = false, updatable = false)
	private Integer menerimaId;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectMenyerahkanFk")
	@Caption(value = "Object Pegawai Meneyrahkan")
	private Pegawai menyerahkan;

	@Column(name = "ObjectMenyerahkanFk", insertable = false, updatable = false)
	private Integer menyerahkanId;

	@Caption(value = "Tanggal Jatuh Tempo")
	@Column(name = "TglJatuhTempo")
	private Date tgljatuhtempo;

	@Caption(value = "Tanggal Struk")
	@Column(name = "TglStruk")
	private Date tglstruk;

	@Caption(value = "Tanggal Terima Kiriman")
	@Column(name = "TglTerimaKiriman")
	private Date tglterimakiriman;

	@Caption(value = "Total Bea Materai")
	@Column(name = "TotalBeaMaterai")
	private Double totalbeamaterai;

	@Caption(value = "Total Berat Kg")
	@Column(name = "TotalBeratKg")
	private Double totalberatkg;

	@Caption(value = "Total Biaya Kirim")
	@Column(name = "TotalBiayaKirim")
	private Double totalbiayakirim;

	@Caption(value = "Total Biaya Tambahan")
	@Column(name = "TotalBiayaTambahan")
	private Double totalbiayatambahan;

	@Caption(value = "Total Discount")
	@Column(name = "TotalDiscount")
	private Double totaldiscount;

	@Caption(value = "Total Discount Give")
	@Column(name = "TotalDiscountGive")
	private Double totaldiscountgive;

	@Caption(value = "Total Discount Save")
	@Column(name = "TotalDiscountSave")
	private Double totaldiscountsave;

	@Caption(value = "Total Harga Satuan")
	@Column(name = "TotalHargaSatuan")
	private Double totalhargasatuan;

	@Caption(value = "Total Harus Di Bayar")
	@Column(name = "TotalHarusDiBayar")
	private Double totalharusdibayar;

	@Caption(value = "Total P P H")
	@Column(name = "TotalPPH")
	private Double totalpph;

	@Caption(value = "Total P P N")
	@Column(name = "TotalPPN")
	private Double totalppn;

	@Caption(value = "Total P Profile")
	@Column(name = "TotalPProfile")
	private Double totalpprofile;

	@Caption(value = "Total P Rekanan")
	@Column(name = "TotalPRekanan")
	private Double totalprekanan;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectSatuanWaktuKeslingFk")
	@Caption(value = "Object Mata Uang")
	private SatuanWaktuKesling satuanWaktuKesling;

	@Column(name = "ObjectSatuanWaktuKeslingFk", insertable = false, updatable = false)
	private Integer ObjectSatuanWaktuKeslingId;

	@JsonManagedReference
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "nostruk")
	@Caption(value = "strukPelayananDetail")
	private Set<StrukPelayananDetail> strukPelayananDetail = new HashSet<>();

	@JsonManagedReference
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "noStrukTerima")
	private Set<HargaNettoProdukByTerima> hargaNettoProdukByTerima = new HashSet<>();

	@JsonManagedReference
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "strukPelayanan")
	private Set<StokProdukDetail> stokProdukDetail = new HashSet<>();

	@JsonManagedReference
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "strukPelayanan")
	private Set<CssdMappingCaraSterilisasi> cssdMappingProsesSterelisasi = new HashSet<>();

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ObjectJenisLimbahB3MasukFk")
	@Caption(value = "Jenis Limbah")
	private JenisLimbahB3Masuk jenisLimbahB3Masuk;

	@Column(name = "ObjectJenisLimbahB3MasukFk", insertable = false, updatable = false)
	private Integer jenisLimbahB3MasukId;

	@Column(name = "isVerifikasi")
	@Caption(value = "verfikasi")
	private String verifikasi;

	@JsonManagedReference
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "noStruk")
	private Set<StrukPelayananPenjamin> penjamin = new HashSet<>();

	@Caption(value = "NoRecTriger")
	@Column(name = "noRecTriger")
	private String noRecTriger;

	@Column(name = "linenBs")
	private String linenBs;

	@Column(name = "linenB")
	private String linenB;

	@Column(name = "linenS")
	private String linenS;

	@Column(name = "linenK")
	private String linenK;

	@Column(name = "poucesBs")
	private String poucesBs;

	@Column(name = "poucesB")
	private String poucesB;

	@Column(name = "poucesS")
	private String poucesS;

	@Column(name = "poucesK")
	private String poucesK;

	@Column(name = "namaLengkapAmbil")
	@Caption(value = "namaLengkapAmbil")
	private String namaLengkapAmbil;

	@Column(name = "tglAmbil")
	@Caption(value = "tglAmbil")
	private Date tglAmbil;

	@Column(name = "keteranganAmbil")
	@Caption(value = "keteranganAmbil")
	private String keteranganAmbil;

	@JsonManagedReference
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "strukPelayanan")
	private Set<MappingKirimDokumenPasien> mapKirimDokumenPasien = new HashSet<>();
}
