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 MakananBayi
 * 
 * @author Generator
 */
@Getter
@Setter
@Entity
@Table(name = "MakananBayi_M")
public class MakananBayi extends BaseMaster {

	@NotNull(message = "Kd Makanan Bayi tidak boleh kosong")
	@Column(name = "KdMakananBayi", nullable = false)
	@Caption(value = "Kode Makanan Bayi")
	private Byte kdMakananBayi;

	@NotNull(message = "Makanan Bayi tidak boleh kosong")
	@Column(name = "MakananBayi", nullable = false, length = 30)
	@Caption(value = "Makanan Bayi")
	private String makananBayi;

	@NotNull(message = "QMakanan Bayi tidak boleh kosong")
	@Column(name = "QMakananBayi", nullable = false)
	@Caption(value = "QMakanan Bayi")
	private Byte qMakananBayi;

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

}