package com.jasamedika.medifirst2000.entities;

import com.jasamedika.medifirst2000.base.BaseMaster;
import com.jasamedika.medifirst2000.helper.Caption;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;
import javax.validation.constraints.NotNull;

import static javax.persistence.GenerationType.SEQUENCE;

/**
 * class JenisPajak
 * 
 * @author Generator
 */
@Getter
@Setter
@Entity
@Table(name = "JenisPajak_M")
public class JenisPajak extends BaseMaster {

	@Column(name = "Deskripsi", length = 300)
	@Caption(value = "Deskripsi")
	private String deskripsi;

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

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

	@ManyToOne
	@JoinColumn(name = "ObjectJenisPajakHeadFk")
	@Caption(value = "Object Jenis Pajak Head")
	private JenisPajak jenisPajakHead;

	@Column(name = "ObjectJenisPajakHeadFk", insertable = false, updatable = false)
	private Integer jenisPajakHeadId;

	@NotNull(message = "QJenis Pajak tidak boleh kosong")
	@Column(name = "QJenisPajak", nullable = false)
	@Caption(value = "QJenis Pajak")
	private Byte qJenisPajak;

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

}