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_layanan_remun_medis", schema = "remun")
public class JenisLayananRemunMedis extends BaseActive {

	@Id
	@GeneratedValue(strategy = SEQUENCE, generator = "sg_jenis_layanan_remun_medis")
	@SequenceGenerator(name = "sg_jenis_layanan_remun_medis", schema = "remun", sequenceName = "remun.m_jenis_layanan_remun_medis_seq", allocationSize = 1)
	@Column(name = "id", columnDefinition = "bigint default nextval('remun.m_jenis_layanan_remun_medis_seq'::regclass)")
	protected Long id;

	/**
	 * Jenis Layanan Remunerasi : Konsultasi Poli, Visite Ranap, Penunjang Rehab
	 * Medik, Penunjang Radiologi, Penunjang PK, Penunjang PA, Tindakan
	 * Non-Operatif, Tindakan Operatif Lengkap, Tindakan Operatif Non Co-op
	 */
	@Column(name = "jenis_layanan", length = 150, unique = true, nullable = false)
	@Size(max = 150, message = "Jenis layanan maksimal {max} karakter")
	@NotBlank(message = "Jenis layanan tidak boleh kosong")
	@Caption("Jenis Layanan")
	private String jenisLayanan;

}
