package com.jasamedika.medifirst2000.entities;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import com.jasamedika.medifirst2000.base.BaseMaster;
import com.jasamedika.medifirst2000.helper.Caption;

/**
 * class JenisPegawai
 * 
 * @author Generator
 */
@Entity // @Audited
@Table(name = "JenisPegawai_M")
public class JenisPegawai extends BaseMaster {
	@NotNull(message = "Jenis Pegawai tidak boleh kosong")
	@Column(name = "JenisPegawai", nullable = false, length = 30)
	@Caption(value = "Jenis Pegawai")
	private String jenisPegawai;

	public void setJenisPegawai(String jenisPegawai) {
		this.jenisPegawai = jenisPegawai;
	}

	public String getJenisPegawai() {
		return this.jenisPegawai;
	}

	@ManyToOne
	@JoinColumn(name = "ObjectDetailKelompokPegawaiFk")
	@Caption(value = "Object Detail Kelompok Pegawai")
	private DetailKelompokPegawai detailKelompokPegawai;

	public void setDetailKelompokPegawai(DetailKelompokPegawai detailKelompokPegawai) {
		this.detailKelompokPegawai = detailKelompokPegawai;
	}

	public DetailKelompokPegawai getDetailKelompokPegawai() {
		return this.detailKelompokPegawai;
	}

	@Column(name = "ObjectDetailKelompokPegawaiFk", insertable = false, updatable = false)
	private Integer detailKelompokPegawaiId;

	@NotNull(message = "Kd Jenis Pegawai tidak boleh kosong")
	@Column(name = "KdJenisPegawai", nullable = false, length = 2)
	@Caption(value = "Kode Jenis Pegawai")
	private String kdJenisPegawai;

	public void setKdJenisPegawai(String kdJenisPegawai) {
		this.kdJenisPegawai = kdJenisPegawai;
	}

	public String getKdJenisPegawai() {
		return this.kdJenisPegawai;
	}

	@NotNull(message = "QJenis Pegawai tidak boleh kosong")
	@Column(name = "QJenisPegawai", nullable = false)
	@Caption(value = "QJenis Pegawai")
	private Byte qJenisPegawai;

	public void setqJenisPegawai(Byte qJenisPegawai) {
		this.qJenisPegawai = qJenisPegawai;
	}

	public Byte getqJenisPegawai() {
		return this.qJenisPegawai;
	}

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

	public Integer getId() {

		return id;
	}

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