package com.jasamedika.medifirst2000.entities; import com.jasamedika.medifirst2000.helper.Caption; import lombok.*; import org.hibernate.annotations.GenericGenerator; import javax.persistence.*; import javax.validation.constraints.NotNull; import java.io.Serializable; import java.util.Date; /** * @author salmanoe * @since Jan 19, 2023 */ @Getter @Setter @AllArgsConstructor @NoArgsConstructor @Builder @Entity @Table(name = "sdm_slipgaji_t") public class SlipGaji implements Serializable { private static final long serialVersionUID = 250139146139305450L; @Id @GenericGenerator(name = "uuid", strategy = "uuid") @GeneratedValue(generator = "uuid") @Column(columnDefinition = "CHAR(32)", unique = true) @Caption(value = "ID") protected String id; @ManyToOne(fetch = FetchType.LAZY) @NotNull(message = "Pegawai tidak boleh kosong") @JoinColumn(name = "pegawaifk", nullable = false) @Caption(value = "Pegawai") private Pegawai pegawai; @Temporal(TemporalType.DATE) @Column(name = "bulan", nullable = false) @Caption(value = "Bulan") private Date bulan; }