package com.uas.search.console.b2b.model;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

/**
 * 买家的不良品入库明细
 * 
 * @author suntg
 * 
 */
@Table(name = "purc$badoutitem")
@Entity
public class PurchaseBadoutItemSimpleInfo {

	@Id
	@Column(name = "poi_id")
	private Long id;

	/**
	 * 采购订单明细
	 */
	@OneToOne(cascade = { CascadeType.REFRESH })
	@JoinColumn(name = "poi_pdid", insertable = false, updatable = false)
	private PurchaseOrderItemSimpleInfo orderItem;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public PurchaseOrderItemSimpleInfo getOrderItem() {
		return orderItem;
	}

	public void setOrderItem(PurchaseOrderItemSimpleInfo orderItem) {
		this.orderItem = orderItem;
	}

	@Override
	public String toString() {
		return "PurchaseOrderItemSimpleInfo [id=" + id + ", orderItem=" + orderItem + "]";
	}
}