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 UnitBagian
 * 
 * @author Generator
 */
@Entity // @Audited
@Table(name = "UnitBagian_M")
public class UnitBagian extends BaseMaster {
	@NotNull(message = "Kd Unit Bagian tidak boleh kosong")
	@Column(name = "KdUnitBagian", nullable = false)
	@Caption(value = "Kode Unit Bagian")
	private Byte kdUnitBagian;

	public void setKdUnitBagian(Byte kdUnitBagian) {
		this.kdUnitBagian = kdUnitBagian;
	}

	public Byte getKdUnitBagian() {
		return this.kdUnitBagian;
	}

	@NotNull(message = "QUnit Bagian tidak boleh kosong")
	@Column(name = "QUnitBagian", nullable = false)
	@Caption(value = "QUnit Bagian")
	private Byte qUnitBagian;

	public void setqUnitBagian(Byte qUnitBagian) {
		this.qUnitBagian = qUnitBagian;
	}

	public Byte getqUnitBagian() {
		return this.qUnitBagian;
	}

	@NotNull(message = "Unit Bagian tidak boleh kosong")
	@Column(name = "UnitBagian", nullable = false, length = 50)
	@Caption(value = "Unit Bagian")
	private String unitBagian;

	public void setUnitBagian(String unitBagian) {
		this.unitBagian = unitBagian;
	}

	public String getUnitBagian() {
		return this.unitBagian;
	}

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

	public Integer getId() {

		return id;
	}

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