44 lines
1.2 KiB
Java
44 lines
1.2 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 static javax.persistence.FetchType.LAZY;
|
|
|
|
/**
|
|
* @author salmanoe
|
|
* @version 1.0.0
|
|
* @since 24/10/2023
|
|
*/
|
|
@Getter
|
|
@Setter
|
|
@Entity
|
|
@Table(name = "ref_satuan_dosis_t")
|
|
public class ReferensiSatuanDosis extends BaseTransaction implements Serializable {
|
|
private static final long serialVersionUID = -4298235101503616044L;
|
|
|
|
@ManyToOne(fetch = LAZY)
|
|
@JoinColumn(name = "pegawaifk")
|
|
@NotNull(message = "Pegawai tidak boleh kosong")
|
|
@Caption(value = "Pegawai")
|
|
private Pegawai pegawai;
|
|
|
|
@Column(name = "pegawaifk", insertable = false, updatable = false, nullable = false)
|
|
private Integer pegawaiId;
|
|
|
|
@ManyToOne(fetch = LAZY)
|
|
@JoinColumn(name = "satuandosisfk")
|
|
@NotNull(message = "Satuan dosis tidak boleh kosong")
|
|
@Caption(value = "Satuan Dosis")
|
|
private SatuanDosis satuanDosis;
|
|
|
|
@Column(name = "satuandosisfk", insertable = false, updatable = false, nullable = false)
|
|
private Long satuanDosisId;
|
|
}
|