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

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

	/**
	 * 序号
	 */
	@Column(name = "pri_number")
	private Short number;

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

	/**
	 * 入库批号
	 */
	@Column(name = "pri_batchcode")
	private String batchCode;

	/**
	 * 入库料号
	 */
	@Column(name = "pri_prodcode")
	private String prodCode;

	public Long getId() {
		return id;
	}

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

	public Short getNumber() {
		return number;
	}

	public void setNumber(Short number) {
		this.number = number;
	}

	public PurchaseOrderItemSimpleInfo getOrderItem() {
		return orderItem;
	}

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

	public String getBatchCode() {
		return batchCode;
	}

	public void setBatchCode(String batchCode) {
		this.batchCode = batchCode;
	}

	public String getProdCode() {
		return prodCode;
	}

	public void setProdCode(String prodCode) {
		this.prodCode = prodCode;
	}

	@Override
	public String toString() {
		return "PurchaseReturnItemSimpleInfo [id=" + id + ", number=" + number + ", orderItem=" + orderItem
				+ ", batchCode=" + batchCode + ", prodCode=" + prodCode + "]";
	}

}