package com.jasamedika.medifirst2000.entities;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import com.jasamedika.medifirst2000.base.BaseMaster;
import com.jasamedika.medifirst2000.helper.Caption;
import org.hibernate.envers.Audited;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

/**
 * class AkibatHaid
 * 
 * @author Generator
 */
@Entity // @Audited
@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;

	public String getKeterangan() {
		return keterangan;
	}

	public void setKeterangan(String keterangan) {
		this.keterangan = keterangan;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getName() {
		return this.name;
	}

	public String getKode() {
		return kode;
	}

	public void setKode(String kode) {
		this.kode = kode;
	}

	@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;

	public int getTahun() {
		return tahun;
	}

	public void setTahun(int tahun) {
		this.tahun = tahun;
	}

	public int getJumlahHari() {
		return jumlahHari;
	}

	public void setJumlahHari(int jumlahHari) {
		this.jumlahHari = jumlahHari;
	}

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

	public Integer getId() {

		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}
}