package com.jasamedika.medifirst2000.entities;

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

import javax.persistence.*;

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

}
