package com.jasamedika.medifirst2000.entities;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonManagedReference;
import com.jasamedika.medifirst2000.base.BaseTransaction;
import com.jasamedika.medifirst2000.helper.Caption;

@Entity
@Table(name = "PenyusunanTRPNPB_T")
@JsonIgnoreProperties({ "hibernateLazyInitializer", "handler" })
public class PenyusunanTRPNPB extends BaseTransaction {

	@Column(name = "Tahun", nullable = true)
	@Caption(value = "Tahun")
	private Integer tahun;

	@Column(name = "Prosentase", nullable = true)
	@Caption(value = "Prosentase")
	private Integer prosentase;

	@Column(name = "PeriodeAwal", nullable = true)
	@Caption(value = "Periode Awal")
	private Date periodeAwal;

	@Column(name = "PeriodeAkhir", nullable = true)
	@Caption(value = "Periode Akhir")
	private Date periodeAkhir;

	@Column(name = "Status", nullable = true)
	@Caption(value = "Status")
	private String status;

	@Column(name = "TglPenyusunan", nullable = true)
	@Caption(value = "Tgl Penyusunan")
	private Date tglPenyusunan;

	@JsonManagedReference
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "penyusunanTRPNPB")
	@Caption(value = "penyusunanDetailTRPNPBSet")
	private Set<PenyusunanDetailTRPNPB> penyusunanDetailTRPNPBSet = new HashSet<PenyusunanDetailTRPNPB>();

	public Set<PenyusunanDetailTRPNPB> getPenyusunanDetailTRPNPBSet() {
		return penyusunanDetailTRPNPBSet;
	}

	public void setPenyusunanDetailTRPNPBSet(Set<PenyusunanDetailTRPNPB> penyusunanDetailTRPNPBSet) {
		this.penyusunanDetailTRPNPBSet = penyusunanDetailTRPNPBSet;
	}

	public Integer getTahun() {
		return tahun;
	}

	public void setTahun(Integer tahun) {
		this.tahun = tahun;
	}

	public Integer getProsentase() {
		return prosentase;
	}

	public void setProsentase(Integer prosentase) {
		this.prosentase = prosentase;
	}

	public Date getPeriodeAwal() {
		return periodeAwal;
	}

	public void setPeriodeAwal(Date periodeAwal) {
		this.periodeAwal = periodeAwal;
	}

	public Date getPeriodeAkhir() {
		return periodeAkhir;
	}

	public void setPeriodeAkhir(Date periodeAkhir) {
		this.periodeAkhir = periodeAkhir;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public Date getTglPenyusunan() {
		return tglPenyusunan;
	}

	public void setTglPenyusunan(Date tglPenyusunan) {
		this.tglPenyusunan = tglPenyusunan;
	}

}
