package com.jasamedika.medifirst2000.entities;

import javax.persistence.*;

import com.jasamedika.medifirst2000.base.BaseMaster;
import javax.validation.constraints.NotNull;

import com.jasamedika.medifirst2000.helper.Caption;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

import static javax.persistence.GenerationType.SEQUENCE;

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

	@NotNull(message = "Event Bayi tidak boleh kosong")
	@Column(name = "EventBayi", nullable = false, length = 20)
	@Caption(value = "Event Bayi")
	private String eventBayi;

	@NotNull(message = "Kd Event Bayi tidak boleh kosong")
	@Column(name = "KdEventBayi", nullable = false)
	@Caption(value = "Kode Event Bayi")
	private Byte kdEventBayi;

	@NotNull(message = "QEvent Bayi tidak boleh kosong")
	@Column(name = "QEventBayi", nullable = false)
	@Caption(value = "QEvent Bayi")
	private Byte qEventBayi;

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

}