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 = "JenisBelanja_M")
public class JenisBelanja extends BaseMaster {

	@Column(name = "KodeJenisBelanja")
	@NotNull(message = "Kode Jenis Belanja tidak boleh kosong")
	@Caption(value = "Kode Jenis Belanja")
	private String kodeJenisBelanja;

	@NotNull(message = "Jenis Belanja tidak boleh kosong")
	@Caption(value = "Jenis Belanja")
	@Column(name = "JenisBelanja", nullable = false, length = 50)
	private String namaJenisBelanja;

	@Column(name = "KeteranganJenisBelanja")
	@NotNull(message = "Keterangan Jenis Belanja tidak boleh kosong")
	@Caption(value = "Keterangan Jenis Belanja")
	private String ketJenisBelanja;

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

}