|
|
@@ -6,18 +6,7 @@ import java.util.HashSet;
|
|
|
import java.util.List;
|
|
|
import java.util.Set;
|
|
|
|
|
|
-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.OneToOne;
|
|
|
-import javax.persistence.SequenceGenerator;
|
|
|
-import javax.persistence.Table;
|
|
|
-import javax.persistence.Transient;
|
|
|
+import javax.persistence.*;
|
|
|
|
|
|
import com.alibaba.fastjson.annotation.JSONField;
|
|
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
|
@@ -58,6 +47,13 @@ public class PurcOrderInfoItem {
|
|
|
@JoinColumn(name = "pd_prid", insertable = false, updatable = false)
|
|
|
private Product product;
|
|
|
|
|
|
+ /**
|
|
|
+ * 产品的附件
|
|
|
+ */
|
|
|
+ @OneToMany(fetch = FetchType.EAGER, cascade = {CascadeType.ALL})
|
|
|
+ @JoinTable(name = "purc$prod$attach", joinColumns = @JoinColumn(name = "pd_id", referencedColumnName = "pd_id"), inverseJoinColumns = @JoinColumn(name="at_id", referencedColumnName = "at_id"))
|
|
|
+ private Set<Attach> attachs;
|
|
|
+
|
|
|
/**
|
|
|
* 数量
|
|
|
*/
|
|
|
@@ -225,6 +221,14 @@ public class PurcOrderInfoItem {
|
|
|
this.product = product;
|
|
|
}
|
|
|
|
|
|
+ public Set<Attach> getAttachs() {
|
|
|
+ return attachs;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setAttachs(Set<Attach> attachs) {
|
|
|
+ this.attachs = attachs;
|
|
|
+ }
|
|
|
+
|
|
|
public Double getQty() {
|
|
|
return qty;
|
|
|
}
|