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 java.util.Date;

import static javax.persistence.FetchType.LAZY;

@Getter
@Setter
@Entity
@Table(name = "PemakaianAsuransi_T")
public class PemakaianAsuransi extends BaseTransaction {
	private static final long serialVersionUID = 8451625158161533060L;

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

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

	@Column(name = "PpkRujukan", length = 100)
	@Caption(value = "PpkRujukan")
	private String ppkRujukan;

	@ManyToOne(fetch = LAZY)
	@JoinColumn(name = "DiagnosisFk")
	@Caption(value = "Diagnosis")
	private Diagnosa diagnosis;

	@Column(name = "DiagnosisFk", insertable = false, updatable = false)
	private Integer diagnosisId;

	@Column(name = "NoKepesertaan", length = 100)
	@Caption(value = "NoKepesertaan")
	private String noKepesertaan;

	@Column(name = "Lakalantas")
	@Caption(value = "Lakalantas")
	private Integer lakalantas;

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

	@Column(name = "NoRujukan", length = 100)
	@Caption(value = "NoRujukan")
	private String noRujukan;

	@Column(name = "NoSep", length = 100)
	@Caption(value = "NoSep")
	private String noSep;

	@ManyToOne(fetch = LAZY)
	@JoinColumn(name = "ObjectAsuransiPasienFk")
	@Caption(value = "Object Asuransi Pasien")
	private AsuransiPasien asuransiPasien;

	@Column(name = "ObjectAsuransiPasienFk", insertable = false, updatable = false)
	private Integer asuransiPasienId;

	@Caption(value = "Tanggal Registrasi")
	@Column(name = "TglRegistrasi")
	private Date tglRegistrasi;

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

	@ManyToOne(fetch = LAZY)
	@JoinColumn(name = "ObjectDiagnosaFK")
	@Caption(value = "ObjectDiagnosaFK")
	private Diagnosa diagnosa;

	@Column(name = "ObjectDiagnosaFK", insertable = false, updatable = false)
	private Integer diagnosaId;

	@Caption(value = "TanggalSep")
	@Column(name = "TanggalSep")
	private Date tanggalSep;
}
