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 MapTindakanMedisToKualitasHasil
 * 
 * @author Generator
 */
@Getter
@Setter
@Entity
@Table(name = "MapTindakanMedisToKualitasHasil_M")
public class MapTindakanMedisToKualitasHasil extends BaseMaster {

	@ManyToOne
	@JoinColumn(name = "ObjectKualitasHasilFk")
	@NotNull(message = "Kd Kualitas Hasil tidak boleh kosong")
	@Caption(value = "Object Kualitas Hasil")
	private KualitasHasil kualitasHasil;

	@Column(name = "ObjectKualitasHasilFk", insertable = false, updatable = false)
	private Integer kualitasHasilId;

	@ManyToOne
	@JoinColumn(name = "ObjectTindakanMedisFk")
	@NotNull(message = "Kd Tindakan Medis tidak boleh kosong")
	@Caption(value = "Object Tindakan Medis")
	private TindakanMedis tindakanMedis;

	@Column(name = "ObjectTindakanMedisFk", insertable = false, updatable = false, nullable = false)
	private Integer tindakanMedisId;

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

}