52 lines
1.4 KiB
Java
52 lines
1.4 KiB
Java
package com.jasamedika.medifirst2000.entities;
|
|
|
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
|
import com.jasamedika.medifirst2000.base.BaseMaster;
|
|
import com.jasamedika.medifirst2000.helper.Caption;
|
|
import lombok.Getter;
|
|
import lombok.Setter;
|
|
|
|
import javax.persistence.*;
|
|
|
|
import static javax.persistence.FetchType.LAZY;
|
|
import static javax.persistence.GenerationType.SEQUENCE;
|
|
|
|
@Getter
|
|
@Setter
|
|
@Entity
|
|
@Table(name = "UnitCost_M")
|
|
@JsonIgnoreProperties({ "hibernateLazyInitializer", "handler" })
|
|
public class UnitCost extends BaseMaster {
|
|
|
|
@Column(name = "KodeUnitCost")
|
|
@Caption(value = "KodeUnitCost")
|
|
private String kodeUnitCost;
|
|
|
|
@Column(name = "NamaUnitCost")
|
|
@Caption(value = "NamaUnitCost")
|
|
private String namaUnitCost;
|
|
|
|
@ManyToOne(fetch = LAZY)
|
|
@JoinColumn(name = "produkFK")
|
|
@Caption(value = "Produk Tindakan")
|
|
private Produk produk;
|
|
|
|
@Column(name = "produkFK", insertable = false, updatable = false)
|
|
private Integer produkId;
|
|
|
|
@ManyToOne
|
|
@JoinColumn(name = "ruanganFk")
|
|
@Caption(value = "Object Ruangan")
|
|
private Ruangan ruangan;
|
|
|
|
@Column(name = "ruanganFk", insertable = false, updatable = false)
|
|
private Integer ruanganId;
|
|
|
|
@Id
|
|
@GeneratedValue(strategy = SEQUENCE, generator = "public.unitcost_m_id_seq")
|
|
@SequenceGenerator(name = "public.unitcost_m_id_seq", sequenceName = "public.unitcost_m_id_seq", allocationSize = 1)
|
|
@Column(name = "id")
|
|
protected Integer id;
|
|
|
|
}
|