package com.jasamedika.medifirst2000.entities;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonBackReference;
import com.jasamedika.medifirst2000.base.BaseTransaction;
import com.jasamedika.medifirst2000.helper.Caption;

@Entity
@Table(name = "DetailPengadaan_T")
public class DetailPengadaan extends BaseTransaction {

	@ManyToOne
	@JoinColumn(name = "ObjectPengadaanFk")
	@Caption(value="Object Pengadaan")
	private Pengadaan pengadaan;

	@Column(name = "ObjectPengadaanFk", insertable=false,updatable=false)
	private Integer pengadaanId;
	
	@ManyToOne
	@JoinColumn(name = "ObjectDetailRupFk")
	@Caption(value="Object Detail Rup")
	@JsonBackReference
	private DetailRup detailRup;

	@Column(name = "ObjectDetailRupFk", insertable=false,updatable=false)
	private String detailRupId;
	
	public Pengadaan getPengadaan() {
		return pengadaan;
	}

	public void setPengadaan(Pengadaan pengadaan) {
		this.pengadaan = pengadaan;
	}

	public Integer getPengadaanId() {
		return pengadaanId;
	}

	public void setPengadaanId(Integer pengadaanId) {
		this.pengadaanId = pengadaanId;
	}

	public DetailRup getDetailRup() {
		return detailRup;
	}

	public void setDetailRup(DetailRup detailRup) {
		this.detailRup = detailRup;
	}

	public String getDetailRupId() {
		return detailRupId;
	}

	public void setDetailRupId(String detailRupId) {
		this.detailRupId = detailRupId;
	}
	
}
