Create tabel voucher paket
This commit is contained in:
parent
1421ee878f
commit
9bf41a73cc
@ -0,0 +1,12 @@
|
||||
package com.jasamedika.medifirst2000.dao;
|
||||
|
||||
import com.jasamedika.medifirst2000.entities.VoucherPaket;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
|
||||
/**
|
||||
* @author Salman
|
||||
* @version 1.0.0
|
||||
* @since 16 Aug 2023
|
||||
*/
|
||||
public interface VoucherPaketDao extends JpaRepository<VoucherPaket, String> {
|
||||
}
|
||||
@ -21,7 +21,7 @@ import com.jasamedika.medifirst2000.helper.Caption;
|
||||
@Table(name = "PasienDaftar_T")
|
||||
@JsonIgnoreProperties({ "hibernateLazyInitializer", "handler" })
|
||||
public class PasienDaftar extends BaseTransaction {
|
||||
private static final long serialVersionUID = 123252008244779475L;
|
||||
private static final long serialVersionUID = -8440203022396266395L;
|
||||
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "ObjectRekananFk")
|
||||
@ -247,6 +247,14 @@ public class PasienDaftar extends BaseTransaction {
|
||||
@Caption(value = "Kode Status Diskon Pegawai")
|
||||
@Column(name = "diskonpegawai", nullable = true)
|
||||
private Integer diskonPegawai;
|
||||
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@Caption(value = "Voucher Paket")
|
||||
@JoinColumn(name = "voucherpaketfk")
|
||||
private VoucherPaket voucherPaket;
|
||||
|
||||
@Column(name = "voucherpaketfk", columnDefinition = "CHAR(32)", insertable = false, updatable = false, nullable = true)
|
||||
private String voucherPaketId;
|
||||
|
||||
public Rekanan getRekanan() {
|
||||
return rekanan;
|
||||
@ -695,4 +703,20 @@ public class PasienDaftar extends BaseTransaction {
|
||||
public void setDiskonPegawai(Integer diskonPegawai) {
|
||||
this.diskonPegawai = diskonPegawai;
|
||||
}
|
||||
|
||||
public VoucherPaket getVoucherPaket() {
|
||||
return voucherPaket;
|
||||
}
|
||||
|
||||
public void setVoucherPaket(VoucherPaket voucherPaket) {
|
||||
this.voucherPaket = voucherPaket;
|
||||
}
|
||||
|
||||
public String getVoucherPaketId() {
|
||||
return voucherPaketId;
|
||||
}
|
||||
|
||||
public void setVoucherPaketId(String voucherPaketId) {
|
||||
this.voucherPaketId = voucherPaketId;
|
||||
}
|
||||
}
|
||||
|
||||
@ -20,6 +20,7 @@ import com.jasamedika.medifirst2000.helper.Caption;
|
||||
@Entity
|
||||
@Table(name = "PelayananPasien_T")
|
||||
public class PelayananPasien extends MedicalRecordTransaction {
|
||||
private static final long serialVersionUID = 5037498494890582092L;
|
||||
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "Generik")
|
||||
@ -255,6 +256,14 @@ public class PelayananPasien extends MedicalRecordTransaction {
|
||||
@JsonBackReference
|
||||
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "pelayananPasien")
|
||||
private Set<PelayananPasienDetail> pelayananPasienDetailSet = new HashSet<>();
|
||||
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@Caption(value = "Voucher Paket")
|
||||
@JoinColumn(name = "voucherpaketfk")
|
||||
private VoucherPaket voucherPaket;
|
||||
|
||||
@Column(name = "voucherpaketfk", columnDefinition = "CHAR(32)", insertable = false, updatable = false, nullable = true)
|
||||
private String voucherPaketId;
|
||||
|
||||
public Generik getGenerik() {
|
||||
return generik;
|
||||
@ -727,4 +736,20 @@ public class PelayananPasien extends MedicalRecordTransaction {
|
||||
public void setDosis(Float dosis) {
|
||||
this.dosis = dosis;
|
||||
}
|
||||
|
||||
public VoucherPaket getVoucherPaket() {
|
||||
return voucherPaket;
|
||||
}
|
||||
|
||||
public void setVoucherPaket(VoucherPaket voucherPaket) {
|
||||
this.voucherPaket = voucherPaket;
|
||||
}
|
||||
|
||||
public String getVoucherPaketId() {
|
||||
return voucherPaketId;
|
||||
}
|
||||
|
||||
public void setVoucherPaketId(String voucherPaketId) {
|
||||
this.voucherPaketId = voucherPaketId;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,58 @@
|
||||
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 javax.validation.constraints.Size;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import static javax.persistence.FetchType.LAZY;
|
||||
|
||||
/**
|
||||
* @author Salman
|
||||
* @version 1.0.0
|
||||
* @since 15 Aug 2023
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
@Table(name = "voucherpaket_m", uniqueConstraints = @UniqueConstraint(columnNames = { "paketfk", "kode" }))
|
||||
public class VoucherPaket extends BaseTransaction {
|
||||
private static final long serialVersionUID = 3602418183807488013L;
|
||||
|
||||
@ManyToOne(fetch = LAZY)
|
||||
@JoinColumn(name = "pasienfk")
|
||||
@NotNull(message = "Pasien tidak boleh kosong")
|
||||
@Caption(value = "Pasien")
|
||||
private Pasien pasien;
|
||||
|
||||
@Column(name = "pasienfk", insertable = false, updatable = false, nullable = false)
|
||||
private Integer pasienId;
|
||||
|
||||
@ManyToOne(fetch = LAZY)
|
||||
@JoinColumn(name = "paketfk")
|
||||
@NotNull(message = "Paket tidak boleh kosong")
|
||||
@Caption(value = "Paket")
|
||||
private Produk paket;
|
||||
|
||||
@Column(name = "paketfk", insertable = false, updatable = false, nullable = false)
|
||||
private Integer paketId;
|
||||
|
||||
@Column(length = 7, nullable = false)
|
||||
@Size(max = 7, message = "Maksimal kode harus 7 karakter")
|
||||
@NotNull(message = "Kode tidak boleh kosong")
|
||||
private String kode;
|
||||
|
||||
@Column(nullable = false)
|
||||
@NotNull(message = "TMT tidak boleh kosong")
|
||||
private Date tmt;
|
||||
|
||||
@Column(nullable = false)
|
||||
@NotNull(message = "Tanggal kedaluwarsa tidak boleh kosong")
|
||||
private Date tglKedaluwarsa;
|
||||
}
|
||||
@ -113,6 +113,11 @@ public class PasienDaftarVO extends BaseTransactionVO {
|
||||
|
||||
@Caption(value = "Kode Status Diskon Pegawai")
|
||||
private Integer diskonPegawai;
|
||||
|
||||
@Caption(value = "Voucher Paket")
|
||||
private VoucherPaketVO voucherPaket;
|
||||
|
||||
private String voucherPaketId;
|
||||
|
||||
public RekananVO getRekanan() {
|
||||
return rekanan;
|
||||
@ -385,4 +390,20 @@ public class PasienDaftarVO extends BaseTransactionVO {
|
||||
public void setDiskonPegawai(Integer diskonPegawai) {
|
||||
this.diskonPegawai = diskonPegawai;
|
||||
}
|
||||
|
||||
public VoucherPaketVO getVoucherPaket() {
|
||||
return voucherPaket;
|
||||
}
|
||||
|
||||
public void setVoucherPaket(VoucherPaketVO voucherPaket) {
|
||||
this.voucherPaket = voucherPaket;
|
||||
}
|
||||
|
||||
public String getVoucherPaketId() {
|
||||
return voucherPaketId;
|
||||
}
|
||||
|
||||
public void setVoucherPaketId(String voucherPaketId) {
|
||||
this.voucherPaketId = voucherPaketId;
|
||||
}
|
||||
}
|
||||
|
||||
@ -158,6 +158,11 @@ public class PelayananPasienVO extends MedicalRecordTransactionVO {
|
||||
private SatuanStandar satuanView;
|
||||
|
||||
private Integer satuanViewId;
|
||||
|
||||
@Caption(value = "Voucher Paket")
|
||||
private VoucherPaketVO voucherPaket;
|
||||
|
||||
private String voucherPaketId;
|
||||
|
||||
public SatuanStandar getSatuanView() {
|
||||
return satuanView;
|
||||
@ -511,4 +516,20 @@ public class PelayananPasienVO extends MedicalRecordTransactionVO {
|
||||
this.jasa = jasa;
|
||||
}
|
||||
|
||||
public VoucherPaketVO getVoucherPaket() {
|
||||
return voucherPaket;
|
||||
}
|
||||
|
||||
public void setVoucherPaket(VoucherPaketVO voucherPaket) {
|
||||
this.voucherPaket = voucherPaket;
|
||||
}
|
||||
|
||||
public String getVoucherPaketId() {
|
||||
return voucherPaketId;
|
||||
}
|
||||
|
||||
public void setVoucherPaketId(String voucherPaketId) {
|
||||
this.voucherPaketId = voucherPaketId;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,38 @@
|
||||
package com.jasamedika.medifirst2000.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.jasamedika.medifirst2000.base.vo.BaseTransactionVO;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* DTO for {@link com.jasamedika.medifirst2000.entities.VoucherPaket}
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class VoucherPaketVO extends BaseTransactionVO {
|
||||
@NotNull(message = "Pasien tidak boleh kosong")
|
||||
private PasienVO pasien;
|
||||
|
||||
private Integer pasienId;
|
||||
|
||||
@NotNull(message = "Paket tidak boleh kosong")
|
||||
private ProdukVO paket;
|
||||
|
||||
private Integer paketId;
|
||||
|
||||
@NotNull(message = "Kode tidak boleh kosong")
|
||||
@Size(message = "Maksimal kode harus 7 karakter", max = 7)
|
||||
private String kode;
|
||||
|
||||
@NotNull(message = "TMT tidak boleh kosong")
|
||||
private Date tmt;
|
||||
|
||||
@NotNull(message = "Tanggal kedaluwarsa tidak boleh kosong")
|
||||
private Date tglKedaluwarsa;
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user