package com.jasamedika.medifirst2000.entities;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import org.hibernate.envers.Audited;

import com.fasterxml.jackson.annotation.JsonBackReference;
import com.jasamedika.medifirst2000.base.BaseTransaction;


@Entity //@Audited
@Table(name="PapProsedurePenanggungJawab_T")
public class PapProsedurePenanggungJawab extends BaseTransaction{
	@JsonBackReference
	@ManyToOne
	@JoinColumn(name = "ObjectRehabilitasiFk")
	@NotNull(message = "Rehabilitasi tidak boleh kosong")
	private PapRehabilitasi papRehabilitasi;

	@Column(name = "ObjectRehabilitasiFk", columnDefinition = "CHAR(32)", insertable = false, updatable = false, nullable = false)
	private String papRehabilitasiId;

	@ManyToOne
	@JoinColumn(name = "ObjectProsedureFk")
	@NotNull(message = "Prosedure tidak boleh kosong")
	private PapProsedure papProsedure;

	@Column(name = "ObjectProsedureFk", insertable = false, updatable = false, nullable = false)
	private Integer papProsedureId;

	@ManyToOne
	@JoinColumn(name = "ObjectPenganggungJawabFk")
	@NotNull(message = "PenganggungJawab tidak boleh kosong")
	private PapPenanggungJawab papPenanggungJawab;
	
	@Column(name = "ObjectPenganggungJawabFk", insertable = false, updatable = false, nullable = false)
	private Integer papPenanggungJawabId;

	public PapRehabilitasi getPapRehabilitasi() {
		return papRehabilitasi;
	}

	public void setPapRehabilitasi(PapRehabilitasi papRehabilitasi) {
		this.papRehabilitasi = papRehabilitasi;
	}

	public PapProsedure getPapProsedure() {
		return papProsedure;
	}

	public void setPapProsedure(PapProsedure papProsedure) {
		this.papProsedure = papProsedure;
	}

	public PapPenanggungJawab getPapPenanggungJawab() {
		return papPenanggungJawab;
	}

	public void setPapPenanggungJawab(PapPenanggungJawab papPenanggungJawab) {
		this.papPenanggungJawab = papPenanggungJawab;
	}

}
