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$apbillitem")
@Entity
public class PurchaseApBillItemSimpleInfo {

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

	/**
	 * 采购单号
	 */
	@Column(name = "papi_ordercode")
	private String orderCode;

	/**
	 * 产品
	 */
	@OneToOne(cascade = { CascadeType.REFRESH })
	@JoinColumn(name = "papi_product", insertable = false, updatable = false)
	private ProductSimpleInfo product;

	public Long getId() {
		return id;
	}

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

	public String getOrderCode() {
		return orderCode;
	}

	public void setOrderCode(String orderCode) {
		this.orderCode = orderCode;
	}

	public ProductSimpleInfo getProduct() {
		return product;
	}

	public void setProduct(ProductSimpleInfo product) {
		this.product = product;
	}

	@Override
	public String toString() {
		return "PurchaseApBillItemSimpleInfo [id=" + id + ", orderCode=" + orderCode + ", product=" + product + "]";
	}
}
