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;

/**
 * class KeadaanUmum
 * 
 * @author Generator
 */
@Getter
@Setter
@Entity
@Table(name = "KeadaanUmum_M")
public class KeadaanUmum extends BaseMaster {

	@NotNull(message = "Kd Keadaan Umum tidak boleh kosong")
	@Column(name = "KdKeadaanUmum", nullable = false)
	@Caption(value = "Kode Keadaan Umum")
	private Byte kdKeadaanUmum;

	@NotNull(message = "Keadaan Umum tidak boleh kosong")
	@Column(name = "KeadaanUmum", nullable = false, length = 30)
	@Caption(value = "Keadaan Umum")
	private String keadaanUmum;

	@NotNull(message = "QKeadaan Umum tidak boleh kosong")
	@Column(name = "QKeadaanUmum", nullable = false)
	@Caption(value = "QKeadaan Umum")
	private Byte qKeadaanUmum;

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

}