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 com.fasterxml.jackson.annotation.JsonBackReference;
import com.jasamedika.medifirst2000.base.BaseTransaction;
import com.jasamedika.medifirst2000.helper.Caption;import org.hibernate.envers.Audited;

@Entity //@Audited
@Table(name="PapStatusPsikososial_T")
public class PapStatusPsikososial extends BaseTransaction{
	@JsonBackReference
	@ManyToOne
	@JoinColumn(name = "ObjectPapRiwayatPsikososialFk")
	@NotNull(message = "PapRiwayatPsikososial tidak boleh kosong")
	private PapRiwayatPsikososial papRiwayatPsikososial;

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

	@ManyToOne
	@JoinColumn(name = "ObjectStatusPsikologiFk")
	@NotNull(message = "statusPsikologi tidak boleh kosong")
	private StatusRiwayatPsikologi statusRiwayatPsikologi;

	@Column(name = "ObjectStatusPsikologiFk", insertable = false, updatable = false, nullable = false)
	private Integer statusPsikologiId;

	@NotNull(message = "Is Nilai tidak boleh kosong")
	@Column(name = "isNilai")
	@Caption(value = "Is Nilai")
	private Boolean isNilai;
	
	public PapRiwayatPsikososial getPapRiwayatPsikososial() {
		return papRiwayatPsikososial;
	}

	public void setPapRiwayatPsikososial(PapRiwayatPsikososial papRiwayatPsikososial) {
		this.papRiwayatPsikososial = papRiwayatPsikososial;
	}

	public StatusRiwayatPsikologi getStatusRiwayatPsikologi() {
		return statusRiwayatPsikologi;
	}

	public void setStatusRiwayatPsikologi(StatusRiwayatPsikologi statusRiwayatPsikologi) {
		this.statusRiwayatPsikologi = statusRiwayatPsikologi;
	}

	public Boolean getIsNilai() {
		return isNilai;
	}

	public void setIsNilai(Boolean isNilai) {
		this.isNilai = isNilai;
	}

}
