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 Pajak
 * 
 * @author Generator
 */
@Entity // @Audited
@Table(name = "Pajak_M")
public class Pajak extends BaseMaster {
	@NotNull(message = "Deskripsi tidak boleh kosong")
	@Column(name = "Deskripsi", nullable = false, length = 300)
	@Caption(value = "Deskripsi")
	private String deskripsi;

	public void setDeskripsi(String deskripsi) {
		this.deskripsi = deskripsi;
	}

	public String getDeskripsi() {
		return this.deskripsi;
	}

	@ManyToOne
	@JoinColumn(name = "ObjectJenisPajakFk")

	@Caption(value = "Object Jenis Pajak")
	private JenisPajak jenisPajak;

	public void setJenisPajak(JenisPajak jenisPajak) {
		this.jenisPajak = jenisPajak;
	}

	public JenisPajak getJenisPajak() {
		return this.jenisPajak;
	}

	@Column(name = "ObjectJenisPajakFk", insertable = false, updatable = false)
	private Integer jenisPajakId;

	@NotNull(message = "Kd Pajak tidak boleh kosong")
	@Column(name = "KdPajak", nullable = false)
	@Caption(value = "Kode Pajak")
	private Byte kdPajak;

	public void setKdPajak(Byte kdPajak) {
		this.kdPajak = kdPajak;
	}

	public Byte getKdPajak() {
		return this.kdPajak;
	}

	@NotNull(message = "Pajak tidak boleh kosong")
	@Column(name = "Pajak", nullable = false, length = 50)
	@Caption(value = "Pajak")
	private String pajak;

	public void setPajak(String pajak) {
		this.pajak = pajak;
	}

	public String getPajak() {
		return this.pajak;
	}

	@NotNull(message = "QPajak tidak boleh kosong")
	@Column(name = "QPajak", nullable = false)
	@Caption(value = "QPajak")
	private Byte qPajak;

	public void setqPajak(Byte qPajak) {
		this.qPajak = qPajak;
	}

	public Byte getqPajak() {
		return this.qPajak;
	}

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

	public Integer getId() {

		return id;
	}

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