Salman Manoe 0e3b77fdc2 Update domain entity
Penerapan lombok untuk mengurangi boilerplate code
2025-02-11 14:41:44 +07:00

41 lines
1.2 KiB
Java

package com.jasamedika.medifirst2000.entities;
import com.jasamedika.medifirst2000.base.BaseActive;
import com.jasamedika.medifirst2000.helper.Caption;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.NotBlank;
import javax.persistence.*;
import javax.validation.constraints.Size;
import static javax.persistence.GenerationType.SEQUENCE;
/**
* @author salmanoe
* @version 1.0.0
* @since 24/04/2024
*/
@Getter
@Setter
@Entity
@Table(name = "m_jenis_logbook", schema = "remun")
public class JenisLogbook extends BaseActive {
@Id
@GeneratedValue(strategy = SEQUENCE, generator = "sg_jenis_logbook")
@SequenceGenerator(name = "sg_jenis_logbook", schema = "remun", sequenceName = "remun.m_jenis_logbook_seq", allocationSize = 1)
@Column(name = "id", columnDefinition = "bigint default nextval('remun.m_jenis_logbook_seq'::regclass)")
protected Long id;
/**
* Jenis Logbook : JKN, NON-JKN, FIXED-PAY, KLAIM MPP
*/
@Column(name = "jenis_logbook", length = 150, unique = true, nullable = false)
@Size(max = 150, message = "Jenis logbook maksimal {max} karakter")
@NotBlank(message = "Jenis logbook tidak boleh kosong")
@Caption("Jenis Logbook")
private String jenisLogbook;
}