package com.jasamedika.medifirst2000.entities;

import java.io.Serializable;
import org.hibernate.envers.Audited;
import javax.persistence.*;

import org.hibernate.validator.constraints.NotEmpty;

import com.jasamedika.medifirst2000.base.BaseMaster;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.internal.util.logging.Messages;

import com.fasterxml.jackson.annotation.JsonManagedReference;
import com.jasamedika.medifirst2000.base.BaseMaster;
import com.jasamedika.medifirst2000.helper.Caption;
import org.hibernate.envers.Audited;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

/**
 * class MapDiagnosaKepToAsKepTujuan
 * 
 * @author Generator
 */
@Entity // @Audited
@Table(name = "MapDiagnosaKepToAsKepTujuan_M")
public class MapDiagnosaKepToAsKepTujuan extends BaseMaster {
	@ManyToOne
	@JoinColumn(name = "ObjectDiagnosaKepFk")
	@NotNull(message = "Kd Diagnosa Kep tidak boleh kosong")

	@Caption(value = "Object Diagnosa Kep")
	private Diagnosa diagnosaKep;

	public void setDiagnosaKep(Diagnosa diagnosaKep) {
		this.diagnosaKep = diagnosaKep;
	}

	public Diagnosa getDiagnosaKep() {
		return this.diagnosaKep;
	}

	@Column(name = "ObjectDiagnosaKepFk", insertable = false, updatable = false)
	private Integer diagnosaKepId;

	@ManyToOne
	@JoinColumn(name = "ObjectTujuanFk")
	@NotNull(message = "Kd Tujuan tidak boleh kosong")

	@Caption(value = "Object Tujuan")
	private AsKepTujuan tujuan;

	public void setujuan(AsKepTujuan tujuan) {
		this.tujuan = tujuan;
	}

	public AsKepTujuan getTujuan() {
		return this.tujuan;
	}

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

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

	public Integer getId() {

		return id;
	}

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