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

	@Column(name = "KodeJenisPengadaan")
	@NotNull(message = "Kode Jenis Pengadaan tidak boleh kosong")
	@Caption(value = "Kode Jenis Pengadaan")
	private String kodeJenisPengadaan;

	@NotNull(message = "Nama Jenis Pengadaan tidak boleh kosong")
	@Caption(value = "Nama Jenis Pengadaan")
	@Column(name = "NamaJenisPengadaan", nullable = false, length = 50)
	private String namaJenisPengadaan;

	@Column(name = "KeteranganJenisPengadaan")
	@NotNull(message = "Keterangan Jenis Pengadaan tidak boleh kosong")
	@Caption(value = "Keterangan Jenis Pengadaan")
	private String ketJenisPengadaan;

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

}