47 lines
1.1 KiB
Java
47 lines
1.1 KiB
Java
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 javax.validation.constraints.NotNull;
|
|
import java.io.Serializable;
|
|
import java.util.Date;
|
|
|
|
import static javax.persistence.FetchType.LAZY;
|
|
|
|
/**
|
|
* @author salmanoe
|
|
* @version 1.0.0
|
|
* @since 21/12/2023
|
|
*/
|
|
@Getter
|
|
@Setter
|
|
@Entity
|
|
@Table(name = "dpjppasien_t")
|
|
public class DpjpPasien extends BaseTransaction implements Serializable {
|
|
|
|
private static final long serialVersionUID = 1837465073831420975L;
|
|
|
|
@ManyToOne(fetch = LAZY)
|
|
@JoinColumn(name = "dokterfk")
|
|
@Caption(value = "Dokter")
|
|
private Pegawai dokter;
|
|
|
|
@ManyToOne(fetch = LAZY)
|
|
@JoinColumn(name = "pasienfk")
|
|
@Caption(value = "Pasien")
|
|
private Pasien pasien;
|
|
|
|
@Column(nullable = false)
|
|
@NotNull(message = "Tanggal awal tidak boleh kosong")
|
|
@Caption(value = "Tanggal Awal")
|
|
private Date tanggalAwal;
|
|
|
|
@Caption(value = "Tanggal Akhir")
|
|
private Date tanggalAkhir;
|
|
|
|
}
|