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

/**
 *  class Agama
 * 
 * @author Generator
 */
@Entity //@Audited
@Table(name = "RiwayatKehamilanDetailObstetri_T")
public class RiwayatKehamilanObstetri extends BaseTransaction {
	
	@ManyToOne
	@JoinColumn(name = "papObstetriFk")
	@Caption(value="Obstetri")
	@NotNull(message="Obstetri Harus Diisi")
	private PapObstetri papObstetri;

	@Column(name = "papObstetriFk", insertable=false,updatable=false,nullable=false)
	private String papObstetriId;
	
	@ManyToOne
	@JoinColumn(name = "RiwayatKehamilanFk")
	@Caption(value="Riwayat Kehamilan")
	@JsonBackReference
	@NotNull(message="Riwayat Kehamilan")
	private RiwayatKehamilan riwayatKehamilan;

	@Column(name = "RiwayatKehamilanFk", insertable=false,updatable=false,nullable=false)
	private Integer riwayatKehamilanId;

	@Column(name = "isNilai")
	@Caption(value = "Is Nilai")
	private Boolean isNilai;
	
	public PapObstetri getPapObstetri() {
		return papObstetri;
	}

	public void setPapObstetri(PapObstetri papObstetri) {
		this.papObstetri = papObstetri;
	}

	public String getPapObstetriId() {
		return papObstetriId;
	}

	public void setPapObstetriId(String papObstetriId) {
		this.papObstetriId = papObstetriId;
	}

	public RiwayatKehamilan getRiwayatKehamilan() {
		return riwayatKehamilan;
	}

	public void setRiwayatKehamilan(RiwayatKehamilan riwayatKehamilan) {
		this.riwayatKehamilan = riwayatKehamilan;
	}

	public Integer getRiwayatKehamilanId() {
		return riwayatKehamilanId;
	}

	public void setRiwayatKehamilanId(Integer riwayatKehamilanId) {
		this.riwayatKehamilanId = riwayatKehamilanId;
	}

	public Boolean getIsNilai() {
		return isNilai;
	}

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

}

