Salman Manoe 83c53cb3d1 Update domain entity
Penerapan lombok untuk mengurangi boilerplate code
2025-02-18 12:00:45 +07:00

75 lines
2.3 KiB
Java

package com.jasamedika.medifirst2000.entities;
import com.fasterxml.jackson.annotation.JsonBackReference;
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;
@Getter
@Setter
@Entity
@Table(name = "PelayananTpn_T")
public class PelayananTpn extends BaseTransaction {
@JsonBackReference
@ManyToOne
@JoinColumn(name = "ObjectPelayananProduksiFk")
@NotNull(message = "PelayananProduksi tidak boleh kosong")
private PelayananProduksi pelayananProduksi;
@Column(name = "ObjectPelayananProduksiFk", columnDefinition = "CHAR(32)", insertable = false, updatable = false, nullable = false)
private String pelayananProduksiId;
@ManyToOne
@JoinColumn(name = "ObjectOrderTpnFk")
@NotNull(message = "PelayananProduksi tidak boleh kosong")
private OrderTpn orderTpn;
@Column(name = "ObjectOrderTpnFk", insertable = false, updatable = false, nullable = false)
private Integer orderTpnId;
@NotNull(message = "per24Jam tidak boleh kosong")
@Column(name = "per24Jam", nullable = false, length = 100)
@Caption(value = "per24Jam")
private String per24;
@JsonBackReference
@ManyToOne
@JoinColumn(name = "ObjectOrderFk")
@NotNull(message = "Order tidak boleh kosong")
private Produk order;
@Column(name = "ObjectOrderFk", insertable = false, updatable = false, nullable = false)
private Integer orderId;
@NotNull(message = "satuan tidak boleh kosong")
@Column(name = "satuan", nullable = false, length = 100)
@Caption(value = "satuan")
private String satuan;
@NotNull(message = "kebutuhan tidak boleh kosong")
@Column(name = "kebutuhan", nullable = false, length = 100)
@Caption(value = "kebutuhan")
private String kebutuhan;
@NotNull(message = "qtyDipakai tidak boleh kosong")
@Column(name = "qtyDipakai", nullable = false, length = 100)
@Caption(value = "qtyDipakai")
private String qty;
@NotNull(message = "harga tidak boleh kosong")
@Column(name = "harga", nullable = false, length = 100)
@Caption(value = "harga")
private Double harga;
@NotNull(message = "subTotal tidak boleh kosong")
@Column(name = "subTotal", nullable = false, length = 100)
@Caption(value = "subTotal")
private Double subTotal;
}