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 InfeksiNosokomial
 * 
 * @author Generator
 */
@Entity // @Audited
@Table(name = "InfeksiNosokomial_M")
public class InfeksiNosokomial extends BaseMaster {
	@NotNull(message = "Infeksi Nosokomial tidak boleh kosong")
	@Column(name = "InfeksiNosokomial", nullable = false, length = 50)
	@Caption(value = "Infeksi Nosokomial")
	private String infeksiNosokomial;

	public void setInfeksiNosokomial(String infeksiNosokomial) {
		this.infeksiNosokomial = infeksiNosokomial;
	}

	public String getInfeksiNosokomial() {
		return this.infeksiNosokomial;
	}

	@NotNull(message = "Kd Infeksi Nosokomial tidak boleh kosong")
	@Column(name = "KdInfeksiNosokomial", nullable = false, length = 2)
	@Caption(value = "Kode Infeksi Nosokomial")
	private String kdInfeksiNosokomial;

	public void setKdInfeksiNosokomial(String kdInfeksiNosokomial) {
		this.kdInfeksiNosokomial = kdInfeksiNosokomial;
	}

	public String getKdInfeksiNosokomial() {
		return this.kdInfeksiNosokomial;
	}

	@ManyToOne
	@JoinColumn(name = "ObjectJenisInfeksiNosokomialFk")
	@NotNull(message = "Kd Jenis Infeksi Nosokomial tidak boleh kosong")

	@Caption(value = "Object Jenis Infeksi Nosokomial")
	private JenisInfeksiNosokomial jenisInfeksiNosokomial;

	public void setJenisInfeksiNosokomial(JenisInfeksiNosokomial jenisInfeksiNosokomial) {
		this.jenisInfeksiNosokomial = jenisInfeksiNosokomial;
	}

	public JenisInfeksiNosokomial getJenisInfeksiNosokomial() {
		return this.jenisInfeksiNosokomial;
	}

	@Column(name = "ObjectJenisInfeksiNosokomialFk", insertable = false, updatable = false)
	private Integer jenisInfeksiNosokomialId;

	@NotNull(message = "QInfeksi Nosokomial tidak boleh kosong")
	@Column(name = "QInfeksiNosokomial", nullable = false)
	@Caption(value = "QInfeksi Nosokomial")
	private Byte qInfeksiNosokomial;

	public void setqInfeksiNosokomial(Byte qInfeksiNosokomial) {
		this.qInfeksiNosokomial = qInfeksiNosokomial;
	}

	public Byte getqInfeksiNosokomial() {
		return this.qInfeksiNosokomial;
	}

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

	public Integer getId() {

		return id;
	}

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