package com.jasamedika.medifirst2000.entities;

import javax.persistence.*;
import javax.validation.constraints.NotNull;

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

import static javax.persistence.GenerationType.SEQUENCE;

/**
 * class AkibatHaid
 * 
 * @author Generator
 */
@Getter
@Setter
@Entity
@Table(name = "RM_FaktorAbk_M")
public class FaktorAbk extends BaseMaster {

	@NotNull(message = "Name tidak boleh kosong")
	@Column(name = "Name", nullable = false, length = 100)
	@Caption(value = "Name")
	private String name;

	@Column(name = "Keterangan", nullable = false, length = 100)
	@Caption(value = "Keterangan")
	private String keterangan;

	@NotNull(message = "Kode tidak boleh kosong")
	@Column(name = "Kode", nullable = false, length = 1)
	@Caption(value = "Kode")
	private String kode;

	@NotNull(message = "Tahun tidak boleh kosong")
	@Column(name = "Tahun", nullable = false, length = 1)
	@Caption(value = "Tahun")
	private int tahun;

	@NotNull(message = "JumlahHari tidak boleh kosong")
	@Column(name = "JumlahHari", nullable = false, length = 1)
	@Caption(value = "JumlahHari")
	private int jumlahHari;

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

}