package com.uas.search.console.b2b.model;

import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * 模具询价明细
 * 
 */
@Table(name = "purc$inquirymoulditems")
@Entity
public class PurchaseInquiryMouldItemSimpleInfo {

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

	/**
	 * 单号
	 */
	@Column(name = "imi_code")
	private String code;

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

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

	/**
	 * 询价单物料明细
	 */
	@OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.EAGER)
	@JoinColumn(name = "imd_imiid", updatable = false, insertable = false)
	private Set<PurchaseInquiryMouldDetailSimpleInfo> mouldDetails;


	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 String getPscode() {
		return pscode;
	}

	public void setPscode(String pscode) {
		this.pscode = pscode;
	}

	public String getPsname() {
		return psname;
	}

	public void setPsname(String psname) {
		this.psname = psname;
	}


	public Set<PurchaseInquiryMouldDetailSimpleInfo> getMouldDetails() {
		return mouldDetails;
	}

	public void setMouldDetails(Set<PurchaseInquiryMouldDetailSimpleInfo> mouldDetails) {
		this.mouldDetails = mouldDetails;
	}

	@Override
	public String toString() {
		return "PurchaseInquiryMouldItemSimpleInfo [id=" + id + ", code=" + code + ", pscode=" + pscode + ", psname="
				+ psname + ", mouldDetails=" + mouldDetails + "]";
	}

}
