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 SatuanHasil
 * 
 * @author Generator
 */
@Entity // @Audited
@Table(name = "SatuanHasil_M")
public class SatuanHasil extends BaseMaster {
	@ManyToOne
	@JoinColumn(name = "ObjectDepartemenFk")
	@NotNull(message = "Kd Departemen tidak boleh kosong")

	@Caption(value = "Object Departemen")
	private Departemen departemen;

	public void setDepartemen(Departemen departemen) {
		this.departemen = departemen;
	}

	public Departemen getDepartemen() {
		return this.departemen;
	}

	@Column(name = "ObjectDepartemenFk", insertable = false, updatable = false)
	private Integer departemenId;

	@NotNull(message = "Kd Satuan Hasil tidak boleh kosong")
	@Column(name = "KdSatuanHasil", nullable = false)
	@Caption(value = "Kode Satuan Hasil")
	private Byte kdSatuanHasil;

	public void setKdSatuanHasil(Byte kdSatuanHasil) {
		this.kdSatuanHasil = kdSatuanHasil;
	}

	public Byte getKdSatuanHasil() {
		return this.kdSatuanHasil;
	}

	@NotNull(message = "QSatuan Hasil tidak boleh kosong")
	@Column(name = "QSatuanHasil", nullable = false)
	@Caption(value = "QSatuan Hasil")
	private Byte qSatuanHasil;

	public void setqSatuanHasil(Byte qSatuanHasil) {
		this.qSatuanHasil = qSatuanHasil;
	}

	public Byte getqSatuanHasil() {
		return this.qSatuanHasil;
	}

	@NotNull(message = "Satuan Hasil tidak boleh kosong")
	@Column(name = "SatuanHasil", nullable = false, length = 30)
	@Caption(value = "Satuan Hasil")
	private String satuanHasil;

	public void setSatuanHasil(String satuanHasil) {
		this.satuanHasil = satuanHasil;
	}

	public String getSatuanHasil() {
		return this.satuanHasil;
	}

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

	public Integer getId() {

		return id;
	}

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