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 JenisSatuanKerja
 * 
 * @author Generator
 */
@Entity // @Audited
@Table(name = "JenisSatuanKerja_M")
public class JenisSatuanKerja extends BaseMaster {
	@NotNull(message = "Jenis Satuan Kerja tidak boleh kosong")
	@Column(name = "JenisSatuanKerja", nullable = false, length = 100)
	@Caption(value = "Jenis Satuan Kerja")
	private String jenisSatuanKerja;

	public void setJenisSatuanKerja(String jenisSatuanKerja) {
		this.jenisSatuanKerja = jenisSatuanKerja;
	}

	public String getJenisSatuanKerja() {
		return this.jenisSatuanKerja;
	}

	@NotNull(message = "Kd Jenis Satuan Kerja tidak boleh kosong")
	@Column(name = "KdJenisSatuanKerja", nullable = false)
	@Caption(value = "Kode Jenis Satuan Kerja")
	private Byte kdJenisSatuanKerja;

	public void setKdJenisSatuanKerja(Byte kdJenisSatuanKerja) {
		this.kdJenisSatuanKerja = kdJenisSatuanKerja;
	}

	public Byte getKdJenisSatuanKerja() {
		return this.kdJenisSatuanKerja;
	}

	@Column(name = "KdPimpinan", nullable = true, length = 5)
	@Caption(value = "Kode Pimpinan")
	private String kdPimpinan;

	public void setKdPimpinan(String kdPimpinan) {
		this.kdPimpinan = kdPimpinan;
	}

	public String getKdPimpinan() {
		return this.kdPimpinan;
	}

	@ManyToOne
	@JoinColumn(name = "ObjectUnitKerjaFk")
	@NotNull(message = "Kd Unit Kerja tidak boleh kosong")

	@Caption(value = "Object Unit Kerja")
	private UnitKerja unitKerja;

	public void setUnitKerja(UnitKerja unitKerja) {
		this.unitKerja = unitKerja;
	}

	public UnitKerja getUnitKerja() {
		return this.unitKerja;
	}

	@Column(name = "ObjectUnitKerjaFk", insertable = false, updatable = false)
	private Integer unitKerjaId;

	@Column(name = "NoJenisSatuanKerja", nullable = true, length = 50)
	@Caption(value = "No Jenis Satuan Kerja")
	private String noJenisSatuanKerja;

	public void setNoJenisSatuanKerja(String noJenisSatuanKerja) {
		this.noJenisSatuanKerja = noJenisSatuanKerja;
	}

	public String getNoJenisSatuanKerja() {
		return this.noJenisSatuanKerja;
	}

	@NotNull(message = "QJenis Satuan Kerja tidak boleh kosong")
	@Column(name = "QJenisSatuanKerja", nullable = false)
	@Caption(value = "QJenis Satuan Kerja")
	private Byte qJenisSatuanKerja;

	public void setqJenisSatuanKerja(Byte qJenisSatuanKerja) {
		this.qJenisSatuanKerja = qJenisSatuanKerja;
	}

	public Byte getqJenisSatuanKerja() {
		return this.qJenisSatuanKerja;
	}

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

	public Integer getId() {

		return id;
	}

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