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 javax.validation.constraints.NotNull; import static javax.persistence.GenerationType.SEQUENCE; /** * class JenisPerawatan * * @author Generator */ @Getter @Setter @Entity @Table(name = "JenisPerawatan_M") @JsonIgnoreProperties({ "hibernateLazyInitializer", "handler" }) public class JenisPerawatan extends BaseMaster { @NotNull(message = "Jenis Perawatan tidak boleh kosong") @Column(name = "JenisPerawatan", nullable = false, length = 80) @Caption(value = "Jenis Perawatan") private String jenisPerawatan; @NotNull(message = "Kd Jenis Perawatan tidak boleh kosong") @Column(name = "KdJenisPerawatan", nullable = false) @Caption(value = "Kode Jenis Perawatan") private Byte kdJenisPerawatan; @ManyToOne @JoinColumn(name = "ObjectJenisPerawatanHeadFk") @Caption(value = "Object Jenis Perawatan Head") private JenisPerawatan jenisPerawatanHead; @Column(name = "ObjectJenisPerawatanHeadFk", insertable = false, updatable = false) private Integer jenisPerawatanHeadId; @NotNull(message = "QJenis Perawatan tidak boleh kosong") @Column(name = "QJenisPerawatan", nullable = false) @Caption(value = "QJenis Perawatan") private Byte qJenisPerawatan; @Id @GeneratedValue(strategy = SEQUENCE, generator = "public.jenisperawatan_m_id_seq") @SequenceGenerator(name = "public.jenisperawatan_m_id_seq", sequenceName = "public.jenisperawatan_m_id_seq", allocationSize = 1) @Column(name = "id") protected Integer id; }