57 lines
1.7 KiB
Java
57 lines
1.7 KiB
Java
package com.jasamedika.medifirst2000.entities;
|
|
|
|
import com.fasterxml.jackson.annotation.JsonBackReference;
|
|
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;
|
|
|
|
import static javax.persistence.CascadeType.ALL;
|
|
import static javax.persistence.FetchType.LAZY;
|
|
|
|
@Getter
|
|
@Setter
|
|
@Entity
|
|
@Table(name = "SanitasiKesehatanLingkungan_T")
|
|
public class SanitasiKesehatanLingkungan extends BaseTransaction {
|
|
|
|
@Caption(value = "Tanggal")
|
|
@Column(name = "Tanggal")
|
|
private Date tanggal;
|
|
|
|
@ManyToOne(fetch = LAZY)
|
|
@JoinColumn(name = "ObjectRuanganFk")
|
|
private Ruangan ruangan;
|
|
|
|
@Column(name = "ObjectRuanganFk", nullable = false, insertable = false, updatable = false)
|
|
private Integer ruanganId;
|
|
|
|
@ManyToOne(fetch = LAZY)
|
|
@JoinColumn(name = "ObjectPegawaiFk")
|
|
private Pegawai pegawai;
|
|
|
|
@Column(name = "ObjectPegawaiFk", nullable = false, insertable = false, updatable = false)
|
|
private Integer pegawaiId;
|
|
|
|
@JsonBackReference
|
|
@OneToMany(cascade = ALL, fetch = LAZY, mappedBy = "sanitasiKesehatanLingkungan")
|
|
private Set<ChecklistSanitasiKLDetail> checklistSanitasiKLDetail = new HashSet<>();
|
|
|
|
@JsonBackReference
|
|
@OneToMany(cascade = ALL, fetch = LAZY, mappedBy = "sanitasiKesehatanLingkungan")
|
|
private Set<PengukuranSanitasiKLDetail> pengukuranSanitasiKLDetail = new HashSet<>();
|
|
|
|
@ManyToOne(fetch = LAZY)
|
|
@JoinColumn(name = "ObjectPjRuanganFk")
|
|
private Pegawai pjRuangan;
|
|
|
|
@Column(name = "ObjectPjRuanganFk", nullable = false, insertable = false, updatable = false)
|
|
private Integer pjRuanganId;
|
|
|
|
}
|