Browse Source

修改物料表结构

dongbw 8 years ago
parent
commit
087ce613f0
1 changed files with 69 additions and 0 deletions
  1. 69 0
      src/main/java/com/uas/platform/b2b/model/ProductStatus.java

+ 69 - 0
src/main/java/com/uas/platform/b2b/model/ProductStatus.java

@@ -0,0 +1,69 @@
+package com.uas.platform.b2b.model;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import org.codehaus.jackson.annotate.JsonIgnore;
+
+import javax.persistence.*;
+import java.io.Serializable;
+
+/**
+ * 物料状态表
+ * Created by dongbw
+ * 18/01/19 13:38.
+ */
+@Entity
+@Table(name = "product$status")
+public class ProductStatus implements Serializable{
+
+    /**
+     *
+     */
+    private static final long serialVersionUID = 1L;
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "product$status_gen")
+    @SequenceGenerator(name = "product$status_gen", sequenceName = "product$status_seq", allocationSize = 1)
+    @Column(name = "prs_id")
+    private Long id;
+
+    /**
+     * uas与b2b可用状态;<br>
+     * 1 已禁用 <br>
+     * 非1 (0 或 null) 可用状态,未禁用
+     */
+    @Column(name = "prs_b2bdiabled")
+    private Short b2bDisabled;
+
+    /**
+     * 关联物料
+     */
+    @OneToOne(cascade = CascadeType.REFRESH)
+    @JoinColumn(name = "prs_prid")
+    private Product product;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Short getB2bDisabled() {
+        return b2bDisabled;
+    }
+
+    public void setB2bDisabled(Short b2bDisabled) {
+        this.b2bDisabled = b2bDisabled;
+    }
+
+    @JsonIgnore
+    @JSONField(serialize = false)
+    public Product getProduct() {
+        return product;
+    }
+
+    public void setProduct(Product product) {
+        this.product = product;
+    }
+}