Update entity voucher paket

Penambahan data kelas dan flag batal paket
This commit is contained in:
Salman Manoe 2023-08-18 21:53:22 +07:00
parent c687445e3a
commit 97822a01e1
2 changed files with 19 additions and 1 deletions

View File

@ -23,7 +23,7 @@ import static javax.persistence.FetchType.LAZY;
@Entity
@Table(name = "voucherpaket_m", uniqueConstraints = @UniqueConstraint(columnNames = { "paketfk", "kode" }))
public class VoucherPaket extends BaseTransaction {
private static final long serialVersionUID = 3602418183807488013L;
private static final long serialVersionUID = 5847793843382551441L;
@ManyToOne(fetch = LAZY)
@JoinColumn(name = "pasienfk")
@ -43,6 +43,15 @@ public class VoucherPaket extends BaseTransaction {
@Column(name = "paketfk", insertable = false, updatable = false, nullable = false)
private Integer paketId;
@ManyToOne(fetch = LAZY)
@JoinColumn(name = "kelasfk")
@NotNull(message = "Kelas tidak boleh kosong")
@Caption(value = "Kelas")
private Kelas kelas;
@Column(name = "kelasfk", insertable = false, updatable = false, nullable = false)
private Integer kelasId;
@Column(length = 7, nullable = false)
@Size(max = 7, message = "Maksimal kode harus 7 karakter")
@NotNull(message = "Kode tidak boleh kosong")
@ -55,4 +64,6 @@ public class VoucherPaket extends BaseTransaction {
@Column(nullable = false)
@NotNull(message = "Tanggal kedaluwarsa tidak boleh kosong")
private Date tglKedaluwarsa;
private Boolean isBatal;
}

View File

@ -26,6 +26,11 @@ public class VoucherPaketVO extends BaseTransactionVO {
private Integer paketId;
@NotNull(message = "Kelas tidak boleh kosong")
private KelasVO kelas;
private Integer kelasId;
@NotNull(message = "Kode tidak boleh kosong")
@Size(message = "Maksimal kode harus 7 karakter", max = 7)
private String kode;
@ -35,4 +40,6 @@ public class VoucherPaketVO extends BaseTransactionVO {
@NotNull(message = "Tanggal kedaluwarsa tidak boleh kosong")
private Date tglKedaluwarsa;
private Boolean isBatal;
}