package com.jasamedika.medifirst2000.entities;

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;

@Getter
@Setter
@Entity
@Table(name = "Kegiatan_M")
public class Kegiatan extends BaseMaster {

	@Column(name = "NamaKegiatan")
	@NotNull(message = "Nama Kegiatan tidak boleh kosong")
	@Caption(value = "Nama Kegiatan")
	private String namaKegiatan;

	@Column(name = "KodeKegiatan")
	@NotNull(message = "Kode Kegiatan tidak boleh kosong")
	@Caption(value = "Kode Kegiatan")
	private String kodeKegiatan;

	@Column(name = "KeteranganKegiatan")
	@NotNull(message = "Keterangan Kegiatan tidak boleh kosong")
	@Caption(value = "Keterangan Kegiatan")
	private String ketKegiatan;

	@Id
	@GeneratedValue(strategy = SEQUENCE, generator = "public.kegiatan_m_id_seq")
	@SequenceGenerator(name = "public.kegiatan_m_id_seq", sequenceName = "public.kegiatan_m_id_seq", allocationSize = 1)
	@Column(name = "id")
	protected Integer id;

}