42 lines
1.4 KiB
Java
42 lines
1.4 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 java.io.Serializable;
|
|
|
|
import static javax.persistence.GenerationType.SEQUENCE;
|
|
|
|
/**
|
|
* @author salmanoe
|
|
* @version 1.0.0
|
|
* @since 04/03/2024
|
|
*/
|
|
@Getter
|
|
@Setter
|
|
@Entity
|
|
@Table(name = "satuan_kinerja_m", schema = "mkko")
|
|
public class SatuanKinerja extends BaseActive implements Serializable {
|
|
@Id
|
|
@GeneratedValue(strategy = SEQUENCE, generator = "sg_satuan_kinerja_m")
|
|
@SequenceGenerator(name = "sg_satuan_kinerja_m", schema = "mkko", sequenceName = "mkko.satuan_kinerja_m_seq", allocationSize = 1)
|
|
@Column(name = "id", columnDefinition = "bigint default nextval('mkko.satuan_kinerja_m_seq'::regclass)")
|
|
protected Long id;
|
|
|
|
@Column(name = "satuan_kinerja", length = 50, unique = true, nullable = false)
|
|
@Size(max = 50, message = "Satuan kinerja maksimal {max} karakter")
|
|
@NotBlank(message = "Satuan kinerja tidak boleh kosong")
|
|
@Caption("Satuan Kinerja")
|
|
private String satuanKinerja;
|
|
|
|
@Column(name = "kode_satuan", length = 10)
|
|
@Size(max = 10, message = "Kode Satuan maksimal {max} karakter")
|
|
@Caption("Kode Satuan")
|
|
private String kodeSatuan;
|
|
}
|