Create TarifRegulerPaket.java

Pembuatan entity tarif reguler paket
This commit is contained in:
Salman Manoe 2023-10-06 17:26:52 +07:00
parent f884363185
commit 1d99f0a6eb

View File

@ -0,0 +1,47 @@
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 static javax.persistence.FetchType.LAZY;
/**
* @author Salman
* @version 1.0.0
* @since 6 Oct 2023
*/
@Getter
@Setter
@Entity
@Table(name = "tarifregulerpaket_m", uniqueConstraints = @UniqueConstraint(columnNames = { "mappaketfk", "kelasfk" }))
public class TarifRegulerPaket extends BaseTransaction {
private static final long serialVersionUID = 1763466609980920417L;
@ManyToOne(fetch = LAZY)
@JoinColumn(name = "mappaketfk")
@NotNull(message = "Mapping produk paket tidak boleh kosong")
@Caption(value = "Mapping produk paket")
private MapProdukPaket mapProdukPaket;
@Column(name = "mappaketfk", columnDefinition = "CHAR(32)", insertable = false, updatable = false, nullable = false)
private String mapProdukPaketId;
@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;
@NotNull(message = "Tarif satuan tidak boleh kosong")
@Column(name = "tarifsatuan", nullable = false)
@Caption(value = "Tarif satuan")
private Double tarifSatuan;
}