164 lines
4.1 KiB
Java
164 lines
4.1 KiB
Java
package com.jasamedika.medifirst2000.entities;
|
|
|
|
import java.io.Serializable;
|
|
import org.hibernate.envers.Audited;
|
|
import javax.persistence.*;
|
|
|
|
import org.hibernate.validator.constraints.NotEmpty;
|
|
|
|
import com.jasamedika.medifirst2000.base.BaseMaster;
|
|
import javax.validation.constraints.NotNull;
|
|
import org.hibernate.validator.constraints.Length;
|
|
import org.hibernate.validator.internal.util.logging.Messages;
|
|
|
|
import com.fasterxml.jackson.annotation.JsonManagedReference;
|
|
import com.jasamedika.medifirst2000.base.BaseMaster;
|
|
import com.jasamedika.medifirst2000.helper.Caption;
|
|
import org.hibernate.envers.Audited;
|
|
import javax.persistence.GeneratedValue;
|
|
import javax.persistence.GenerationType;
|
|
import javax.persistence.Id;
|
|
|
|
/**
|
|
* class MenuDietBahan
|
|
*
|
|
* @author Generator
|
|
*/
|
|
@Entity // @Audited
|
|
@Table(name = "MenuDietBahan_M")
|
|
public class MenuDietBahan extends BaseMaster {
|
|
@Column(name = "FormulasiRacikan", nullable = true, length = 200)
|
|
@Caption(value = "Formulasi Racikan")
|
|
private String formulasiRacikan;
|
|
|
|
public void setFormulasiRacikan(String formulasiRacikan) {
|
|
this.formulasiRacikan = formulasiRacikan;
|
|
}
|
|
|
|
public String getFormulasiRacikan() {
|
|
return this.formulasiRacikan;
|
|
}
|
|
|
|
@ManyToOne
|
|
@JoinColumn(name = "ObjectProdukBDFk")
|
|
@NotNull(message = "Kd Produk B D tidak boleh kosong")
|
|
|
|
@Caption(value = "Object Produk B D")
|
|
private Produk produkBD;
|
|
|
|
public void setProdukBD(Produk produkBD) {
|
|
this.produkBD = produkBD;
|
|
}
|
|
|
|
public Produk getProdukBD() {
|
|
return this.produkBD;
|
|
}
|
|
|
|
@Column(name = "ObjectProdukBDFk", insertable = false, updatable = false)
|
|
private Integer produkBDId;
|
|
|
|
@ManyToOne
|
|
@JoinColumn(name = "ObjectProdukMDFk")
|
|
@NotNull(message = "Kd Produk M D tidak boleh kosong")
|
|
|
|
@Caption(value = "Object Produk M D")
|
|
private Produk produkMD;
|
|
|
|
public void setProdukMD(Produk produkMD) {
|
|
this.produkMD = produkMD;
|
|
}
|
|
|
|
public Produk getProdukMD() {
|
|
return this.produkMD;
|
|
}
|
|
|
|
@Column(name = "ObjectProdukMDFk", insertable = false, updatable = false, nullable = false)
|
|
private Integer produkMDId;
|
|
|
|
@ManyToOne
|
|
@JoinColumn(name = "ObjectSatuanKecilFk")
|
|
|
|
@Caption(value = "Object Satuan Kecil")
|
|
private SatuanKecil satuanKecil;
|
|
|
|
public void setSatuanKecil(SatuanKecil satuanKecil) {
|
|
this.satuanKecil = satuanKecil;
|
|
}
|
|
|
|
public SatuanKecil getSatuanKecil() {
|
|
return this.satuanKecil;
|
|
}
|
|
|
|
@Column(name = "ObjectSatuanKecilFk", insertable = false, updatable = false, nullable = false)
|
|
private Integer satuanKecilId;
|
|
|
|
@ManyToOne
|
|
@JoinColumn(name = "ObjectSatuanStandarFk")
|
|
|
|
@Caption(value = "Object Satuan Standar")
|
|
private SatuanStandar satuanStandar;
|
|
|
|
public void setSatuanStandar(SatuanStandar satuanStandar) {
|
|
this.satuanStandar = satuanStandar;
|
|
}
|
|
|
|
public SatuanStandar getSatuanStandar() {
|
|
return this.satuanStandar;
|
|
}
|
|
|
|
@Column(name = "ObjectSatuanStandarFk", insertable = false, updatable = false)
|
|
private Integer satuanStandarId;
|
|
|
|
@Column(name = "KeteranganLainnya", nullable = true, length = 150)
|
|
@Caption(value = "Keterangan Lainnya")
|
|
private String keteranganLainnya;
|
|
|
|
public void setKeteranganLainnya(String keteranganLainnya) {
|
|
this.keteranganLainnya = keteranganLainnya;
|
|
}
|
|
|
|
public String getKeteranganLainnya() {
|
|
return this.keteranganLainnya;
|
|
}
|
|
|
|
@NotNull(message = "Qty Produk tidak boleh kosong")
|
|
@Column(name = "QtyProduk", nullable = false)
|
|
@Caption(value = "Qty Produk")
|
|
private Double qtyProduk;
|
|
|
|
public void setqtyProduk(Double qtyProduk) {
|
|
this.qtyProduk = qtyProduk;
|
|
}
|
|
|
|
public Double getqtyProduk() {
|
|
return this.qtyProduk;
|
|
}
|
|
|
|
@NotNull(message = "Satuan tidak boleh kosong")
|
|
@Column(name = "Satuan", nullable = false, length = 1)
|
|
@Caption(value = "Satuan")
|
|
private String satuan;
|
|
|
|
public void setSatuan(String satuan) {
|
|
this.satuan = satuan;
|
|
}
|
|
|
|
public String getSatuan() {
|
|
return this.satuan;
|
|
}
|
|
|
|
@Id
|
|
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "public.menudietbahan_m_id_seq")
|
|
@javax.persistence.SequenceGenerator(name = "public.menudietbahan_m_id_seq", sequenceName = "public.menudietbahan_m_id_seq", allocationSize = 1)
|
|
@Column(name = "id")
|
|
protected Integer id;
|
|
|
|
public Integer getId() {
|
|
|
|
return id;
|
|
}
|
|
|
|
public void setId(Integer id) {
|
|
this.id = id;
|
|
}
|
|
} |