51 lines
1.5 KiB
Java
51 lines
1.5 KiB
Java
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 javax.validation.constraints.NotNull;
|
|
import java.util.Date;
|
|
import java.util.HashSet;
|
|
import java.util.Set;
|
|
|
|
import static javax.persistence.CascadeType.ALL;
|
|
import static javax.persistence.FetchType.LAZY;
|
|
|
|
@Getter
|
|
@Setter
|
|
@Entity
|
|
@Table(name = "PAPriwayatImunisasi_T")
|
|
public class PapRiwayatImunisasi extends BaseTransaction {
|
|
|
|
@ManyToOne
|
|
@JoinColumn(name = "ObjectPasienFk")
|
|
@NotNull(message = "Pasien tidak boleh kosong")
|
|
private AntrianPasienDiPeriksa pasien;
|
|
|
|
@Column(name = "ObjectPasienFk", columnDefinition = "CHAR(32)", insertable = false, updatable = false, nullable = false)
|
|
private String pasienId;
|
|
|
|
@NotNull(message = "Tgl Input tidak boleh kosong")
|
|
@Column(name = "tglInput", nullable = false)
|
|
@Caption(value = "Tgl Input")
|
|
private Date tglInput;
|
|
|
|
@Column(name = "hasilImunisasi")
|
|
@Caption(value = "hasilImunisasi")
|
|
private String hasilImunisasi;
|
|
|
|
@JsonManagedReference
|
|
@OneToMany(cascade = ALL, fetch = LAZY, mappedBy = "papRiwayatImunisasi")
|
|
@Caption(value = "papImunisasiDetailSet")
|
|
private Set<PapImunisasiDetail> papImunisasiDetailSet = new HashSet<>();
|
|
|
|
@Column(name = "keteranganLainnya")
|
|
@Caption(value = "keteranganLainnya")
|
|
private String keteranganLainnya;
|
|
|
|
}
|