package com.jasamedika.medifirst2000.entities;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
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;

/**
 * class Agama
 * 
 * @author Generator
 */
@Entity // @Audited
@Table(name = "GeneralProdukInteraksi_M")
public class GeneralProdukInteraksi extends BaseMaster {
	
	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "public.general_produk_m_id_seq")
	@javax.persistence.SequenceGenerator(name = "public.general_produk_m_id_seq", sequenceName = "public.general_produk_m_id_seq", allocationSize = 1)
	@Column(name = "id")
	protected Integer id;
	
	@Column(name = "keteranganLainnya", nullable = true, length = 100)
	@Caption(value = "keteranganLainnya")
	private String keteranganLainnya;
	
	@Column(name = "efekInteraksi", nullable = true, length = 100)
	@Caption(value = "efekInteraksi")
	private String efekInteraksi;

	@NotNull(message = "kd  EfekInteraksi tidak boleh kosong")
	@Column(name = "kdEfekInteraksi", nullable = false)
	@Caption(value = "kd  EfekInteraksi")
	private Byte kdEfekInteraksi  ;

	@NotNull(message = "q  EfekInteraksi tidak boleh kosong")
	@Column(name = "qEfekInteraksi", nullable = false)
	@Caption(value = "qEfekInteraksi")
	private short qEfekInteraksi;
	
	@ManyToOne
	@JoinColumn(name = "ObjectInteraksiProdukFk")
	@NotNull(message = "Interaksi Produk tidak boleh kosong")
	@Caption(value = "Object Interaksi Produk")
	private InteraksiProduk interaksiProduk;

	@Column(name = "ObjectInteraksiProdukFk", insertable = false, updatable = false,nullable=false)
	private Integer interaksiProdukId;
	
	@ManyToOne
	@JoinColumn(name = "ObjectGeneralProdukFk")
	@NotNull(message = "General Produk tidak boleh kosong")
	@Caption(value = "Object General Produk")
	private GeneralProduk generalProduk;

	@Column(name = "ObjectMekanismeInteraksiFk", insertable = false, updatable = false,nullable=false)
	private Integer mekanismeInteraksiProdukId;


}