Merge branch 'dev/ddl' into prod/no-cron
This commit is contained in:
commit
e1b4d1d2fc
@ -1,16 +1,11 @@
|
|||||||
package com.jasamedika.medifirst2000.base;
|
package com.jasamedika.medifirst2000.base;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
import javax.persistence.Column;
|
|
||||||
import javax.persistence.GeneratedValue;
|
|
||||||
import javax.persistence.GenerationType;
|
|
||||||
import javax.persistence.Id;
|
|
||||||
import javax.persistence.MappedSuperclass;
|
|
||||||
|
|
||||||
import org.hibernate.annotations.GenericGenerator;
|
import org.hibernate.annotations.GenericGenerator;
|
||||||
import org.hibernate.validator.constraints.Length;
|
import org.hibernate.validator.constraints.Length;
|
||||||
|
|
||||||
|
import javax.persistence.*;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base class for all entities, but using String idString as 'id'
|
* Base class for all entities, but using String idString as 'id'
|
||||||
*
|
*
|
||||||
@ -19,20 +14,9 @@ import org.hibernate.validator.constraints.Length;
|
|||||||
@MappedSuperclass
|
@MappedSuperclass
|
||||||
public class BaseMasterProduk extends BaseActive implements Serializable {
|
public class BaseMasterProduk extends BaseActive implements Serializable {
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
// private static final long serialVersionUID = -7522287859244078391L;
|
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(
|
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "public.produk_m_id_seq")
|
||||||
strategy=GenerationType.SEQUENCE,
|
@SequenceGenerator(name = "public.produk_m_id_seq", sequenceName = "public.produk_m_id_seq", allocationSize = 1)
|
||||||
generator="public.produk_m_id_seq")
|
|
||||||
@javax.persistence.SequenceGenerator(
|
|
||||||
name="public.produk_m_id_seq",
|
|
||||||
sequenceName="public.produk_m_id_seq",
|
|
||||||
allocationSize=1
|
|
||||||
)
|
|
||||||
@Column(name = "id")
|
@Column(name = "id")
|
||||||
protected Integer id;
|
protected Integer id;
|
||||||
|
|
||||||
@ -57,10 +41,6 @@ public class BaseMasterProduk extends BaseActive implements Serializable {
|
|||||||
this.noRec = noRec;
|
this.noRec = noRec;
|
||||||
}
|
}
|
||||||
|
|
||||||
// public static long getSerialversionuid() {
|
|
||||||
// return serialVersionUID;
|
|
||||||
// }
|
|
||||||
|
|
||||||
@Length(min = 1, max = 50, message = "")
|
@Length(min = 1, max = 50, message = "")
|
||||||
@Column(name = "reportDisplay")
|
@Column(name = "reportDisplay")
|
||||||
protected String reportDisplay;
|
protected String reportDisplay;
|
||||||
|
|||||||
@ -0,0 +1,40 @@
|
|||||||
|
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 15/02/2024
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@Entity
|
||||||
|
@Table(name = "obattindakan_t")
|
||||||
|
public class ObatLayananTindakan extends BaseTransaction implements Serializable {
|
||||||
|
|
||||||
|
@ManyToOne(fetch = LAZY)
|
||||||
|
@JoinColumn(name = "tindakanpasienfk", nullable = false)
|
||||||
|
@NotNull(message = "Tindakan pasien Tidak boleh Kosong")
|
||||||
|
@Caption(value = "Tindakan Pasien")
|
||||||
|
private PelayananPasien tindakanPasien;
|
||||||
|
|
||||||
|
@ManyToOne(fetch = LAZY)
|
||||||
|
@JoinColumn(name = "obatfk", nullable = false)
|
||||||
|
@NotNull(message = "Obat tidak boleh kosong")
|
||||||
|
@Caption(value = "Obat")
|
||||||
|
private Produk obat;
|
||||||
|
|
||||||
|
@Column(nullable = false, columnDefinition = "numeric(6,2)")
|
||||||
|
@NotNull(message = "Jumlah obat tidak boleh kosong")
|
||||||
|
private Double jumlahObat;
|
||||||
|
}
|
||||||
@ -0,0 +1,39 @@
|
|||||||
|
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;
|
||||||
|
}
|
||||||
@ -6,6 +6,7 @@ import com.jasamedika.medifirst2000.base.BaseMasterProduk;
|
|||||||
import com.jasamedika.medifirst2000.helper.Caption;
|
import com.jasamedika.medifirst2000.helper.Caption;
|
||||||
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
import javax.persistence.*;
|
import javax.persistence.*;
|
||||||
@ -23,6 +24,7 @@ import static javax.persistence.FetchType.LAZY;
|
|||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@Entity
|
@Entity
|
||||||
|
@NoArgsConstructor
|
||||||
@Table(name = "Produk_M")
|
@Table(name = "Produk_M")
|
||||||
public class Produk extends BaseMasterProduk {
|
public class Produk extends BaseMasterProduk {
|
||||||
public Produk(String kdProduk, String namaProduk, Integer id, SatuanStandar satuanStandar) {
|
public Produk(String kdProduk, String namaProduk, Integer id, SatuanStandar satuanStandar) {
|
||||||
@ -70,10 +72,6 @@ public class Produk extends BaseMasterProduk {
|
|||||||
this.keterangan = keterangan;
|
this.keterangan = keterangan;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Produk() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@JsonBackReference
|
@JsonBackReference
|
||||||
@OneToMany(cascade = CascadeType.ALL, fetch = LAZY, mappedBy = "produk")
|
@OneToMany(cascade = CascadeType.ALL, fetch = LAZY, mappedBy = "produk")
|
||||||
private Set<ProdukDetailLaboratorium> produkDetail = new HashSet<>();
|
private Set<ProdukDetailLaboratorium> produkDetail = new HashSet<>();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user