Update DokterRawatBersama.java
Penambahan relasi detail registrasi
This commit is contained in:
parent
a9e273e8f0
commit
4405b001df
@ -1,16 +1,16 @@
|
||||
package com.jasamedika.medifirst2000.entities;
|
||||
|
||||
import com.jasamedika.medifirst2000.helper.Caption;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.EmbeddedId;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Table;
|
||||
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
|
||||
@ -21,14 +21,23 @@ import java.util.Date;
|
||||
@Entity
|
||||
@Table(name = "dokterrawatbersama_t")
|
||||
public class DokterRawatBersama implements Serializable {
|
||||
private static final long serialVersionUID = -2730359617233536316L;
|
||||
private static final long serialVersionUID = 6332383431538705253L;
|
||||
|
||||
@EmbeddedId
|
||||
private DokterRawatBersamaId id;
|
||||
private DokterRawatBersamaId id;
|
||||
|
||||
@Column(nullable = false)
|
||||
@NotNull(message = "Tanggal awal tidak boleh kosong")
|
||||
private Date tanggalAwal;
|
||||
@Column(nullable = false)
|
||||
@NotNull(message = "Tanggal awal tidak boleh kosong")
|
||||
private Date tanggalAwal;
|
||||
|
||||
private Date tanggalAkhir;
|
||||
private Date tanggalAkhir;
|
||||
|
||||
@ManyToOne(fetch = LAZY)
|
||||
@JoinColumn(name = "noregistrasifk", nullable = false)
|
||||
@NotNull(message = "No Registrasi Harus Diisi")
|
||||
@Caption(value = "No Registrasi")
|
||||
private AntrianPasienDiPeriksa detailRegistrasi;
|
||||
|
||||
@Column(name = "noregistrasifk", columnDefinition = "CHAR(32)", nullable = false, insertable = false, updatable = false)
|
||||
private String detailRegistrasiId;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user