package com.uas.platform.b2b.model;

import java.io.Serializable;
import java.util.Date;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.OrderBy;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * 模具询价单明细的报价记录
 * 
 * 
 */
@Table(name = "purc$inquirymouldreply")
@Entity
public class PurchaseInquiryMouldReply implements Serializable {

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

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "mr_id")
	private Long id;

	/**
	 * （卖家报的）单价
	 */
	@Column(name = "mr_reply")
	private Double reply;
	
	/**
	 *  报价日期
	 */
	@Column(name = "mr_replydate")
	private Date replyDate;
	
	
	/**
	 * 模具明细id
	 * 
	 */
	@Column(name = "mr_imiid", nullable = false)
	private Long itemId;
	
	/**
	 * 模具物料报价
	 */
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
	@JoinColumn(name = "mpr_mrid")
	@OrderBy("id")
	private Set<PurchaseInquiryMouldProdReply> prodReplies;


	public Long getId() {
		return id;
	}

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

	public Double getReply() {
		return reply;
	}

	public void setReply(Double reply) {
		this.reply = reply;
	}
	
	public Date getReplyDate() {
		return replyDate;
	}

	public void setReplyDate(Date replyDate) {
		this.replyDate = replyDate;
	}

	public Long getItemId() {
		return itemId;
	}

	public void setItemId(Long itemId) {
		this.itemId = itemId;
	}

	public Set<PurchaseInquiryMouldProdReply> getProdReplies() {
		return prodReplies;
	}

	public void setProdReplies(Set<PurchaseInquiryMouldProdReply> prodReplies) {
		this.prodReplies = prodReplies;
	}


}
