Salman Manoe 42fa923b1a Update domain entity
Penerapan lombok untuk mengurangi boilerplate code
2025-02-20 15:08:40 +07:00

82 lines
2.4 KiB
Java

package com.jasamedika.medifirst2000.entities;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
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;
import static javax.persistence.CascadeType.ALL;
import static javax.persistence.FetchType.LAZY;
@Getter
@Setter
@Entity
@Table(name = "StrukRetur_T")
@JsonIgnoreProperties({ "hibernateLazyInitializer", "handler" })
public class StrukRetur extends BaseTransaction {
@ManyToOne(fetch = LAZY)
@JoinColumn(name = "ObjectKelompokTransaksiFk")
@Caption(value = "Object Kelompok Transaksi")
private KelompokTransaksi kelompokTransaksi;
@Column(name = "ObjectKelompokTransaksiFk", insertable = false, updatable = false)
private Integer kelompokTransaksiId;
@ManyToOne(fetch = LAZY)
@JoinColumn(name = "ObjectRuanganFk")
@Caption(value = "Object Ruangan")
private Ruangan ruangan;
@ManyToOne(fetch = LAZY)
@JoinColumn(name = "ObjectPegawaiFk")
@Caption(value = "Object Pegawai Order")
private Pegawai pegawai;
@Column(name = "ObjectPegawaiFk", insertable = false, updatable = false)
private Integer pegawaiId;
@Column(name = "ObjectRuanganFk", insertable = false, updatable = false)
private Integer ruanganId;
@Caption(value = "Keterangan Alasan")
@Column(name = "KeteranganAlasan", length = 150)
private String keteranganAlasan;
@Caption(value = "Keterangan Lainnya")
@Column(name = "KeteranganLainnya", length = 100)
private String keteranganLainnya;
@Caption(value = "No Retur")
@Column(name = "NoRetur", nullable = false, length = 100)
private String noRetur;
@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 = "Tanggal Retur")
@Column(name = "TglRetur", nullable = false)
private Date tglRetur;
@JsonManagedReference
@OneToMany(cascade = ALL, fetch = LAZY, mappedBy = "noRetur")
private Set<KirimProduk> kirimProduk = new HashSet<>();
@JsonManagedReference
@OneToMany(cascade = ALL, fetch = LAZY, mappedBy = "noretur")
private Set<StrukPelayananDetail> strukPelayananDetail = new HashSet<>();
}