package com.jasamedika.medifirst2000.entities;

import java.io.Serializable;
import org.hibernate.envers.Audited;
import javax.persistence.*;

import org.hibernate.validator.constraints.NotEmpty;

import com.jasamedika.medifirst2000.base.BaseMaster;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.internal.util.logging.Messages;

import com.fasterxml.jackson.annotation.JsonManagedReference;
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 Alergi
 * 
 * @author Generator
 */
@Entity // @Audited
@Table(name = "Alergi_M")
public class Alergi extends BaseMaster {
	@NotNull(message = "Kd Alergi tidak boleh kosong")
	@Column(name = "KdAlergi", nullable = false)
	@Caption(value = "Kode Alergi")
	private short kdAlergi;

	public void setKodeAlergi(short kdAlergi) {
		this.kdAlergi = kdAlergi;
	}

	public short getKodeAlergi() {
		return this.kdAlergi;
	}

	@Caption(value = "Nama Alergi")
	@NotNull(message = "Nama Alergi tidak boleh kosong")
	@Column(name = "NamaAlergi", nullable = false, length = 25)
	private String namaAlergi;

	public void setNamaAlergi(String namaAlergi) {
		this.namaAlergi = namaAlergi;
	}

	public String getNamaAlergi() {
		return this.namaAlergi;
	}

	@NotNull(message = "QAlergi tidak boleh kosong")
	@Column(name = "QAlergi", nullable = false)
	@Caption(value = "QAlergi")
	private short qAlergi;

	public void setQAlergi(short qAlergi) {
		this.qAlergi = qAlergi;
	}

	public short getQAlergi() {
		return this.qAlergi;
	}

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

	public Integer getId() {

		return id;
	}

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