package com.jasamedika.medifirst2000.entities;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.jasamedika.medifirst2000.base.BaseMaster;
import com.jasamedika.medifirst2000.helper.Caption;

@Entity // @Audited
@Table(name = "Observasi_M")
public class Observasi extends BaseMaster {
	
	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "public.Observasi_M_id_seq")
	@javax.persistence.SequenceGenerator(name = "public.Observasi_M_id_seq", sequenceName = "public.Observasi_M_id_seq", allocationSize = 1)
	@Column(name = "id")
	protected Integer id;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}
	
	@ManyToOne(fetch=FetchType.LAZY)
	@Caption(value="Head Observasi")
	@JoinColumn(name="Observasifk")
	private Observasi observasi;
	
	@Column(name="Observasifk", insertable=false, updatable=false, nullable=true)
	private Integer observasiId;
	
	@ManyToOne(fetch=FetchType.LAZY)
	@Caption(value="JenisObservasi")
	@JoinColumn(name="JenisObservasifk")
	private JenisObservasi jenisObservasi;
	
	@Column(name="JenisObservasifk", insertable=false, updatable=false, nullable=true)
	private Integer jenisObservasiId;
	
	@Caption(value="nilainormal ")
	@Column(name="nilainormal ", nullable=true)
	private String nilainormal ;

	public Observasi getObservasi() {
		return observasi;
	}

	public void setObservasi(Observasi observasi) {
		this.observasi = observasi;
	}

	public Integer getObservasiId() {
		return observasiId;
	}

	public void setObservasiId(Integer observasiId) {
		this.observasiId = observasiId;
	}

	public JenisObservasi getJenisObservasi() {
		return jenisObservasi;
	}

	public void setJenisObservasi(JenisObservasi jenisObservasi) {
		this.jenisObservasi = jenisObservasi;
	}

	public Integer getJenisObservasiId() {
		return jenisObservasiId;
	}

	public void setJenisObservasiId(Integer jenisObservasiId) {
		this.jenisObservasiId = jenisObservasiId;
	}

	public String getNilainormal() {
		return nilainormal;
	}

	public void setNilainormal(String nilainormal) {
		this.nilainormal = nilainormal;
	}
}
