package com.jasamedika.medifirst2000.entities;

import com.jasamedika.medifirst2000.base.BaseMaster;
import com.jasamedika.medifirst2000.helper.Caption;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;
import javax.validation.constraints.NotNull;

import static javax.persistence.GenerationType.SEQUENCE;

/**
 * class MapAsKepIntervensiToRasional
 * 
 * @author Generator
 */
@Getter
@Setter
@Entity
@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;

	@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;

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

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

}