Update model entities
Perbaikan struktur mapping obat tindakan paket
This commit is contained in:
parent
9370c28f40
commit
de49da1fc2
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
|
||||
jasamedika-web/src/main/webapp/WEB-INF/web.xml
|
||||
@ -8,6 +8,7 @@ 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;
|
||||
|
||||
@ -37,4 +38,20 @@ public class ObatLayananTindakan extends BaseTransaction implements Serializable
|
||||
@Column(nullable = false, columnDefinition = "numeric(6,2)")
|
||||
@NotNull(message = "Jumlah obat tidak boleh kosong")
|
||||
private Double jumlahObat;
|
||||
|
||||
@Column(updatable = false, columnDefinition = "timestamp default current_date")
|
||||
private Date tanggalDibuat;
|
||||
|
||||
@ManyToOne(fetch = LAZY)
|
||||
@JoinColumn(name = "dibuat_pegawai_id")
|
||||
@Caption(value = "Dibuat oleh pegawai")
|
||||
private Pegawai dibuatOleh;
|
||||
|
||||
@Column(insertable = false)
|
||||
private Date tanggalDiubah;
|
||||
|
||||
@ManyToOne(fetch = LAZY)
|
||||
@JoinColumn(name = "diubah_pengguna_id")
|
||||
@Caption(value = "Diubah oleh pegawai")
|
||||
private Pegawai diubahOleh;
|
||||
}
|
||||
|
||||
@ -5,10 +5,7 @@ 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.persistence.*;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
@ -36,4 +33,14 @@ public class ObatTindakan extends BaseTransaction implements Serializable {
|
||||
@NotNull(message = "Obat tidak boleh kosong")
|
||||
@Caption(value = "Obat")
|
||||
private Produk obat;
|
||||
|
||||
@ManyToOne(fetch = LAZY)
|
||||
@JoinColumn(name = "satuanfk", nullable = false)
|
||||
@NotNull(message = "Satuan tidak boleh kosong")
|
||||
@Caption(value = "Satuan")
|
||||
private SatuanStandar satuan;
|
||||
|
||||
@Column(nullable = false, columnDefinition = "numeric(6,2)")
|
||||
@NotNull(message = "Jumlah obat tidak boleh kosong")
|
||||
private Double jumlah;
|
||||
}
|
||||
|
||||
@ -8,6 +8,9 @@ import lombok.Setter;
|
||||
import javax.persistence.*;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import static javax.persistence.FetchType.LAZY;
|
||||
import static javax.persistence.GenerationType.SEQUENCE;
|
||||
|
||||
/**
|
||||
* class SatuanStandar
|
||||
*
|
||||
@ -18,7 +21,7 @@ import javax.validation.constraints.NotNull;
|
||||
@Entity
|
||||
@Table(name = "SatuanStandar_M")
|
||||
public class SatuanStandar extends BaseMaster {
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@ManyToOne(fetch = LAZY)
|
||||
@JoinColumn(name = "ObjectDepartemenFk")
|
||||
@Caption(value = "Object Departemen")
|
||||
private Departemen departemen;
|
||||
@ -26,14 +29,14 @@ public class SatuanStandar extends BaseMaster {
|
||||
@Column(name = "ObjectDepartemenFk", insertable = false, updatable = false)
|
||||
private Integer departemenId;
|
||||
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@ManyToOne(fetch = LAZY)
|
||||
@JoinColumn(name = "ObjectKelompokProdukFk")
|
||||
@Caption(value = "Object Kelompok Produk")
|
||||
private KelompokProduk kelompokProduk;
|
||||
@Column(name = "ObjectKelompokProdukFk", insertable = false, updatable = false, nullable = false)
|
||||
private Integer kelompokProdukId;
|
||||
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@ManyToOne(fetch = LAZY)
|
||||
@JoinColumn(name = "KdHeadSatuanStandard")
|
||||
@Caption(value = "Satuan Standar")
|
||||
private SatuanStandar satuanStandarHead;
|
||||
@ -51,7 +54,7 @@ public class SatuanStandar extends BaseMaster {
|
||||
private String satuanStandar;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "public.satuanstandar_m_id_seq")
|
||||
@GeneratedValue(strategy = SEQUENCE, generator = "public.satuanstandar_m_id_seq")
|
||||
@SequenceGenerator(name = "public.satuanstandar_m_id_seq", sequenceName = "public.satuanstandar_m_id_seq", allocationSize = 1)
|
||||
@Column(name = "id")
|
||||
protected Integer id;
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
</context-param>
|
||||
<context-param>
|
||||
<param-name>spring.profiles.default</param-name>
|
||||
<param-value>web</param-value>
|
||||
<param-value>localhost</param-value>
|
||||
</context-param>
|
||||
|
||||
<listener>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user