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 MapPegawaiToObjekPajak
 * 
 * @author Generator
 */
@Entity // @Audited
@Table(name = "MapPegawaiToObjekPajak_M")
public class MapPegawaiToObjekPajak extends BaseMaster {
	@ManyToOne
	@JoinColumn(name = "ObjectObjekPajakFk")
	@NotNull(message = "Kd Objek Pajak tidak boleh kosong")

	@Caption(value = "Object Objek Pajak")
	private ObjekPajak objekPajak;

	public void setObjekPajak(ObjekPajak objekPajak) {
		this.objekPajak = objekPajak;
	}

	public ObjekPajak getObjekPajak() {
		return this.objekPajak;
	}

	@Column(name = "ObjectObjekPajakFk", insertable = false, updatable = false)
	private Integer objekPajakId;

	@ManyToOne
	@JoinColumn(name = "ObjectPegawaiFk")
	@NotNull(message = "Kd Pegawai tidak boleh kosong")

	@Caption(value = "Object Pegawai")
	private Pegawai pegawai;


	@Column(name = "ObjectPegawaiFk", insertable = false, updatable = false, nullable = false)
	private Integer pegawaiId;

	@ManyToOne
	@JoinColumn(name = "ObjectRangeFk")
	@NotNull(message = "Kd Range tidak boleh kosong")

	@Caption(value = "Object Range")
	private Range range;

	public void setRange(Range range) {
		this.range = range;
	}

	public Range getRange() {
		return this.range;
	}

	@Column(name = "ObjectRangeFk", insertable = false, updatable = false, nullable = false)
	private Integer rangeId;

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

	public Integer getId() {

		return id;
	}

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

	public Pegawai getPegawai() {
		return pegawai;
	}

	public void setPegawai(Pegawai pegawai) {
		this.pegawai = pegawai;
	}

	public Integer getPegawaiId() {
		return pegawaiId;
	}

	public void setPegawaiId(Integer pegawaiId) {
		this.pegawaiId = pegawaiId;
	}
	
}