package com.uas.platform.b2b.model;

import com.alibaba.fastjson.annotation.JSONField;
import org.codehaus.jackson.annotate.JsonIgnore;

import javax.persistence.*;

/**
 * 模具物料明细
 */
@Entity
@Table(name = "purc$inquirymoulddetail")
public class PurchaseInquiryMouldDetail {

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

	/**
	 * 单据编号
	 */
	@Column(name = "imd_code")
	private String code;

	/**
	 * 序号
	 */
	@Column(name = "imd_detno")
	private Short detno;

	/**
	 * 询价单id
	 */
	@Column(name = "imd_imid")
	private Long imid;

	/**
	 * 物料编号
	 */
	@Column(name = "imd_prodcode")
	private String prodCode;

	/**
	 * 物料型号
	 */
	@Column(name = "imd_prodtitle")
	private String prodTitle;

	/**
	 * 物料规格
	 */
	@Column(name = "imd_prodspec")
	private String prodSpec;

	/**
	 * 物料价格(作为单品价格显示)
	 */
	@Column(name = "imd_price")
	private Double price;

	/**
	 * 报价价格（作为历史显示）
	 */
	@Column(name = "imd_reply")
	private Double reply;

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

	/**
	 * 模具编号
	 */
	@Column(name = "imd_pscode")
	private String psCode;

	/**
	 * 模具名称
	 */
	@Column(name = "imd_psname")
	private String psName;

	/**
	 * 询价详细
	 */
	@ManyToOne(cascade = CascadeType.ALL, optional = true)
	@JoinColumn(name = "imd_imiid", nullable = false)
	private PurchaseInquiryMouldItem inquiryMouldItem;

	/**
	 * 报价物料明细id
	 */
	@Column(name = "imd_pmdid")
	private Long pmdId;

	/**
	 * erp sourcrId
	 */
	@Column(name = "imd_erpsourceid")
	private Long erpSourceId;

	public Long getId() {
		return id;
	}

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

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public Short getDetno() {
		return detno;
	}

	public void setDetno(Short detno) {
		this.detno = detno;
	}

	public String getProdCode() {
		return prodCode;
	}

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

	public String getProdTitle() {
		return prodTitle;
	}

	public void setProdTitle(String prodTitle) {
		this.prodTitle = prodTitle;
	}

	public String getProdSpec() {
		return prodSpec;
	}

	public void setProdSpec(String prodSpec) {
		this.prodSpec = prodSpec;
	}

	public Double getPrice() {
		return price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}

	public String getRemark() {
		return remark;
	}

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

	public String getPsCode() {
		return psCode;
	}

	public void setPsCode(String psCode) {
		this.psCode = psCode;
	}

	public Double getReply() {
		return reply;
	}

	public void setReply(Double reply) {
		this.reply = reply;
	}

	public String getPsName() {
		return psName;
	}

	public void setPsName(String psName) {
		this.psName = psName;
	}

	public Long getPmdId() {
		return pmdId;
	}

	public void setPmdId(Long pmdId) {
		this.pmdId = pmdId;
	}

	public Long getErpSourceId() {
		return erpSourceId;
	}

	public void setErpSourceId(Long erpSourceId) {
		this.erpSourceId = erpSourceId;
	}

	public Long getImid() {
		return imid;
	}

	public void setImid(Long imid) {
		this.imid = imid;
	}

	@JsonIgnore
	@JSONField(serialize = false)
	public PurchaseInquiryMouldItem getInquiryMouldItem() {
		return inquiryMouldItem;
	}

	public void setInquiryMouldItem(PurchaseInquiryMouldItem inquiryMouldItem) {
		this.inquiryMouldItem = inquiryMouldItem;
	}

}
