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

	@NotNull(message = "Kemen/Lemb boleh kosong")
	@Caption(value = "KemenLemb")
	@Column(name = "KemenLemb", length = 200)
	private String namaKemenLemb;

	@NotNull(message = "Kode Kemen/Lemb tidak boleh kosong")
	@Caption(value = "Kode Kemen/Lemb")
	@Column(name = "KodeKemenLemb", length = 50)
	private String kodeKemenLemb;

	@NotNull(message = "Keterangan tidak boleh kosong")
	@Caption(value = "Keterangan")
	@Column(name = "Keterangan", length = 200)
	private String ketKemenlemb;

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

}