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

@Entity //@Audited
@Table(name="PapPengaruhNyeri_T")
public class PapPengaruhNyeri extends BaseTransaction{
	@JsonBackReference
	@ManyToOne
	@JoinColumn(name = "ObejctPapSkriningNyeriFk")
	@Caption(value = "Object PapSkriningNyeri")
	private PapSkriningNyeri papSkriningNyeri;
	
	@Column(name = "ObejctPapSkriningNyeriFk", columnDefinition = "CHAR(32)", insertable = false, updatable = false, nullable = true)
	private String papSkriningNyeriId;

	@ManyToOne
	@JoinColumn(name = "ObejctRmKarakteristikNyeriFk")
	@Caption(value = "Object RmKarakteristikNyeri")
	private DataNyeriMempengaruhi dataNyeriPempengaruhi;

	@Column(name = "ObejctRmKarakteristikNyeriFk", insertable = false, updatable = false, nullable = true)
	private Integer rmPengaruhNyeriId;

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

	public void setPapSkriningNyeri(PapSkriningNyeri papSkriningNyeri) {
		this.papSkriningNyeri = papSkriningNyeri;
	}

	public DataNyeriMempengaruhi getDataNyeriPempengaruhi() {
		return dataNyeriPempengaruhi;
	}

	public void setDataNyeriPempengaruhi(DataNyeriMempengaruhi dataNyeriPempengaruhi) {
		this.dataNyeriPempengaruhi = dataNyeriPempengaruhi;
	}

	public Boolean getIsNilai() {
		return isNilai;
	}

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

}
