Review tabel mapping obat tindakan dan obat pelayanan pasien untuk amprah obat tindakan paket
40 lines
981 B
Java
40 lines
981 B
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.Entity;
|
|
import javax.persistence.JoinColumn;
|
|
import javax.persistence.ManyToOne;
|
|
import javax.persistence.Table;
|
|
import javax.validation.constraints.NotNull;
|
|
import java.io.Serializable;
|
|
|
|
import static javax.persistence.FetchType.LAZY;
|
|
|
|
/**
|
|
* @author salmanoe
|
|
* @version 1.0.0
|
|
* @since 15/02/2024
|
|
*/
|
|
@Getter
|
|
@Setter
|
|
@Entity
|
|
@Table(name = "obattindakan_m")
|
|
public class ObatTindakan extends BaseTransaction implements Serializable {
|
|
|
|
@ManyToOne(fetch = LAZY)
|
|
@JoinColumn(name = "tindakanfk", nullable = false)
|
|
@NotNull
|
|
@Caption(value = "Tindakan")
|
|
private Produk tindakan;
|
|
|
|
@ManyToOne(fetch = LAZY)
|
|
@JoinColumn(name = "obatfk", nullable = false)
|
|
@NotNull(message = "Obat tidak boleh kosong")
|
|
@Caption(value = "Obat")
|
|
private Produk obat;
|
|
}
|