package com.uas.platform.b2b.model;

import java.io.Serializable;
import java.sql.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * 
 * 采购订单回复记录
 * 
 * @author yingp
 *
 */
@Table(name = "purc$reply")
@Entity
public class PurchaseReply implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "purc$reply_gen")
	@SequenceGenerator(name = "purc$reply_gen", sequenceName = "purc$reply_seq", allocationSize = 1)
	@Column(name = "pr_id")
	private Long id;

	/**
	 * 回复时日期
	 */
	@Column(name = "pr_date")
	private Date date;

	/**
	 * 采购订单明细
	 */
	@ManyToOne(cascade = { CascadeType.PERSIST, CascadeType.MERGE })
	@JoinColumn(name = "pr_pdid", updatable = true, insertable = false)
	private PurchaseOrderItem orderItem;

	/**
	 * 数量
	 */
	@Column(name = "pr_qty")
	private Double qty;

	/**
	 * 备注
	 */
	@Column(name = "pr_remark")
	private String remark;

	/**
	 * 交货日期
	 */
	@Column(name = "pr_delivery")
	private Date delivery;

	public Long getId() {
		return id;
	}

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

	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public PurchaseOrderItem getOrderItem() {
		return orderItem;
	}

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

	public Double getQty() {
		return qty;
	}

	public void setQty(Double qty) {
		this.qty = qty;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public Date getDelivery() {
		return delivery;
	}

	public void setDelivery(Date delivery) {
		this.delivery = delivery;
	}

}
