|
|
@@ -0,0 +1,156 @@
|
|
|
+package com.uas.search.console.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.Id;
|
|
|
+import javax.persistence.JoinColumn;
|
|
|
+import javax.persistence.OneToMany;
|
|
|
+import javax.persistence.OneToOne;
|
|
|
+import javax.persistence.OrderBy;
|
|
|
+import javax.persistence.Table;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 商城销售订单
|
|
|
+ *
|
|
|
+ * @author sunyj
|
|
|
+ * @since 2016年10月14日 上午10:09:53
|
|
|
+ */
|
|
|
+@Entity(name = "trade.Order")
|
|
|
+@Table(name = "trade$order")
|
|
|
+public class OrderSimpleInfo implements Serializable {
|
|
|
+
|
|
|
+ private static final long serialVersionUID = 1L;
|
|
|
+
|
|
|
+ @Id
|
|
|
+ @Column(name = "id")
|
|
|
+ private Long id;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 订单号
|
|
|
+ */
|
|
|
+ @Column(name = "or_id", unique = true)
|
|
|
+ private String orderid;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 买方uu
|
|
|
+ *
|
|
|
+ * @Tip 这里因为平台作为中间商,下达订单都看做给平台下达订单
|
|
|
+ */
|
|
|
+ @Column(name = "or_buyeruu")
|
|
|
+ private Long buyeruu;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 买方姓名
|
|
|
+ */
|
|
|
+ @Column(name = "or_buyername")
|
|
|
+ private String buyername;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 买方企业
|
|
|
+ *
|
|
|
+ * @Tip 这里因为平台作为中间商,下达订单都看做给平台下达订单
|
|
|
+ */
|
|
|
+ @OneToOne
|
|
|
+ @JoinColumn(name = "or_buyerenuu", updatable = false, insertable = false)
|
|
|
+ private EnterpriseSimpleInfo buyerEnterprise;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 卖方企业
|
|
|
+ *
|
|
|
+ * @Tip 这里因为平台作为中间商,下达订单都看做给平台下达订单
|
|
|
+ */
|
|
|
+ @OneToOne
|
|
|
+ @JoinColumn(name = "or_sellerenuu", updatable = false, insertable = false)
|
|
|
+ private EnterpriseSimpleInfo sellerEnterprise;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 订单生成时间
|
|
|
+ */
|
|
|
+ @Column(name = "or_creattime")
|
|
|
+ private Date creattime;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 订单明细
|
|
|
+ */
|
|
|
+ @OneToMany(mappedBy = "order", cascade = { CascadeType.ALL }, fetch = FetchType.EAGER)
|
|
|
+ @OrderBy("detno")
|
|
|
+ private Set<OrderDetailSimpleInfo> orderDetails;
|
|
|
+
|
|
|
+ public Long getId() {
|
|
|
+ return id;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setId(Long id) {
|
|
|
+ this.id = id;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getOrderid() {
|
|
|
+ return orderid;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setOrderid(String orderid) {
|
|
|
+ this.orderid = orderid;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Long getBuyeruu() {
|
|
|
+ return buyeruu;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setBuyeruu(Long buyeruu) {
|
|
|
+ this.buyeruu = buyeruu;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getBuyername() {
|
|
|
+ return buyername;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setBuyername(String buyername) {
|
|
|
+ this.buyername = buyername;
|
|
|
+ }
|
|
|
+
|
|
|
+ public EnterpriseSimpleInfo getBuyerEnterprise() {
|
|
|
+ return buyerEnterprise;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setBuyerEnterprise(EnterpriseSimpleInfo buyerEnterprise) {
|
|
|
+ this.buyerEnterprise = buyerEnterprise;
|
|
|
+ }
|
|
|
+
|
|
|
+ public EnterpriseSimpleInfo getSellerEnterprise() {
|
|
|
+ return sellerEnterprise;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setSellerEnterprise(EnterpriseSimpleInfo sellerEnterprise) {
|
|
|
+ this.sellerEnterprise = sellerEnterprise;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Date getCreattime() {
|
|
|
+ return creattime;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setCreattime(Date creattime) {
|
|
|
+ this.creattime = creattime;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Set<OrderDetailSimpleInfo> getOrderDetails() {
|
|
|
+ return orderDetails;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setOrderDetails(Set<OrderDetailSimpleInfo> orderDetails) {
|
|
|
+ this.orderDetails = orderDetails;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public String toString() {
|
|
|
+ return "OrderSimpleInfo [id=" + id + ", orderid=" + orderid + ", buyeruu=" + buyeruu + ", buyername="
|
|
|
+ + buyername + ", buyerEnterprise=" + buyerEnterprise + ", sellerEnterprise=" + sellerEnterprise
|
|
|
+ + ", creattime=" + creattime + ", orderDetails=" + orderDetails + "]";
|
|
|
+ }
|
|
|
+
|
|
|
+}
|