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;

@Entity
@Table(name = "PegawaiSKPajak_M")
public class PegawaiSKPajak extends BaseMaster {
	
	@ManyToOne
	@JoinColumn(name = "ObjectGolonganPegawaiFk")
	@NotNull(message = "Kd GolonganPegawai tidak boleh kosong")
	@Caption(value = "Object GolonganPegawai")
	private GolonganPegawai golonganPegawai;
	
	@Column(name = "ObjectGolonganPegawaiFk", insertable = false, updatable = false)
	private Integer golonganPegawaiId;
	
	@ManyToOne
	@JoinColumn(name = "ObjectRangeFk")
	@NotNull(message = "Kd Range tidak boleh kosong")
	@Caption(value = "Object Range")
	private Range range;
	
	@Column(name = "ObjectRangeFk", insertable = false, updatable = false)
	private Integer rangeId;
	
	@ManyToOne
	@JoinColumn(name = "ObjectObjekPajakFk")
	@NotNull(message = "Kd ObjekPajak tidak boleh kosong")
	@Caption(value = "Object ObjekPajak")
	private ObjekPajak objekPajak;
	
	@Column(name = "ObjectObjekPajakFk", insertable = false, updatable = false)
	private Integer objekPajakId;
	
    @ManyToOne
    @JoinColumn(name = "NoSKFk")
    @Caption(value="No S K") 
    private SuratKeputusan noSK;
	
	@Column(name = "NoSKFk", insertable = false, updatable = false)
	private Integer noSKId;
	
	@Column(name="PersenPajak")
	@Caption(value="PersenPajak")
	private Double persenPajak;
	
	@Column(name="KeteranganLainnya", nullable = true)
	@Caption(value="KeteranganLainnya")
	private String keteranganLainnya;
	
	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "public.PegawaiSKPajak_m_id_seq")
	@javax.persistence.SequenceGenerator(name = "public.PegawaiSKPajak_m_id_seq", sequenceName = "public.PegawaiSKPajak_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 GolonganPegawai getGolonganPegawai() {
		return golonganPegawai;
	}

	public void setGolonganPegawai(GolonganPegawai golonganPegawai) {
		this.golonganPegawai = golonganPegawai;
	}

	public Integer getGolonganPegawaiId() {
		return golonganPegawaiId;
	}

	public void setGolonganPegawaiId(Integer golonganPegawaiId) {
		this.golonganPegawaiId = golonganPegawaiId;
	}

	public Range getRange() {
		return range;
	}

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

	public Integer getRangeId() {
		return rangeId;
	}

	public void setRangeId(Integer rangeId) {
		this.rangeId = rangeId;
	}

	public ObjekPajak getObjekPajak() {
		return objekPajak;
	}

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

	public Integer getObjekPajakId() {
		return objekPajakId;
	}

	public void setObjekPajakId(Integer objekPajakId) {
		this.objekPajakId = objekPajakId;
	}

	public SuratKeputusan getNoSK() {
		return noSK;
	}

	public void setNoSK(SuratKeputusan noSK) {
		this.noSK = noSK;
	}

	public Integer getNoSKId() {
		return noSKId;
	}

	public void setNoSKId(Integer noSKId) {
		this.noSKId = noSKId;
	}

	public Double getPersenPajak() {
		return persenPajak;
	}

	public void setPersenPajak(Double persenPajak) {
		this.persenPajak = persenPajak;
	}

	public String getKeteranganLainnya() {
		return keteranganLainnya;
	}

	public void setKeteranganLainnya(String keteranganLainnya) {
		this.keteranganLainnya = keteranganLainnya;
	}

}
