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.jasamedika.medifirst2000.base.BaseMaster;
import com.jasamedika.medifirst2000.helper.Caption;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

@Entity
@Table(name = "DetailKajianEvaluasi_M")
public class DetailKajianEvaluasi extends BaseMaster {
	@ManyToOne
	@JoinColumn(name = "ObjectTujuanFk")
	@NotNull(message = "Tujuan tidak boleh kosong")
	@Caption(value = "Tujuan")
	private Jabatan tujuan;

	@Column(name = "ObjectTujuanFk", insertable = false, updatable = false, nullable = false)
	private Integer tujuanId;

	@Column(name = "statusUsulan")
	@Caption(value = "Status Usulan")
	private String statusUsulan;

	@Column(name = "koreksi")
	@Caption(value = "Koreksi")
	private String koreksi;

	@ManyToOne
	@JoinColumn(name = "ObjectKajianEvaluasiFk")
	@NotNull(message = "Kajian Evaluasi tidak boleh kosong")
	@Caption(value = "Kajian Evaluasi")
	private KajianEvaluasi kajianEvaluasi;

	@Column(name = "ObjectKajianEvaluasiFk", insertable = false, updatable = false, nullable = false)
	private Integer kajianId;

	public Jabatan getTujuan() {
		return tujuan;
	}

	public void setTujuan(Jabatan tujuan) {
		this.tujuan = tujuan;
	}

	public Integer getTujuanId() {
		return tujuanId;
	}

	public void setTujuanId(Integer tujuanId) {
		this.tujuanId = tujuanId;
	}

	public KajianEvaluasi getKajianEvaluasi() {
		return kajianEvaluasi;
	}

	public void setKajianEvaluasi(KajianEvaluasi kajianEvaluasi) {
		this.kajianEvaluasi = kajianEvaluasi;
	}

	public Integer getKajianId() {
		return kajianId;
	}

	public void setKajianId(Integer kajianId) {
		this.kajianId = kajianId;
	}

	public String getStatusUsulan() {
		return statusUsulan;
	}

	public void setStatusUsulan(String statusUsulan) {
		this.statusUsulan = statusUsulan;
	}

	public String getKoreksi() {
		return koreksi;
	}

	public void setKoreksi(String koreksi) {
		this.koreksi = koreksi;
	}

	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "public.detailkajianevaluasi_m_id_seq")
	@javax.persistence.SequenceGenerator(name = "public.detailkajianevaluasi_m_id_seq", sequenceName = "public.detailkajianevaluasi_m_id_seq", allocationSize = 1)
	@Column(name = "id")
	protected Integer id;

	public Integer getId() {

		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}
}