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 MapAsKepIntervensiToRasional
 * 
 * @author Generator
 */
@Entity // @Audited
@Table(name = "MapAsKepIntervensiToRasional_M")
public class MapAsKepIntervensiToRasional extends BaseMaster {
	@ManyToOne
	@JoinColumn(name = "ObjectIntervensiFk")
	@NotNull(message = "Kd Intervensi tidak boleh kosong")

	@Caption(value = "Object Intervensi")
	private AsKepIntervensi intervensi;

	public void setIntervensi(AsKepIntervensi intervensi) {
		this.intervensi = intervensi;
	}

	public AsKepIntervensi getIntervensi() {
		return this.intervensi;
	}

	@Column(name = "ObjectIntervensiFk", insertable = false, updatable = false)
	private Integer intervensiId;

	@ManyToOne
	@JoinColumn(name = "ObjectRasionalIFk")
	@NotNull(message = "Kd Rasional I tidak boleh kosong")

	@Caption(value = "Object Rasional I")
	private AsKepRasionalI rasionalI;

	public void setRasionalI(AsKepRasionalI rasionalI) {
		this.rasionalI = rasionalI;
	}

	public AsKepRasionalI getRasionalI() {
		return this.rasionalI;
	}

	@Column(name = "ObjectRasionalIFk", insertable = false, updatable = false, nullable = false)
	private Integer rasionalIId;

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

	public Integer getId() {

		return id;
	}

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