소스 검색

添加实体类

hubert 7 년 전
부모
커밋
e0b26caac1

+ 5 - 0
src/main/java/com/uas/credit/model/abnormalinfo/AbnormalReport.java

@@ -1,5 +1,7 @@
 package com.uas.credit.model.abnormalinfo;
 
+import com.uas.credit.model.debtinfo.EndeptinfoReport;
+
 import javax.persistence.*;
 import java.io.Serializable;
 import java.util.Date;
@@ -36,6 +38,9 @@ public class AbnormalReport implements Serializable {
     @JoinColumn(name = "report_id")
     private List<AbnormalInfo> cisReport;
 
+    @OneToOne(cascade = CascadeType.PERSIST)
+    private AbnormalRoot abnormalRoot;
+
     public Long getId() {
         return id;
     }

+ 50 - 0
src/main/java/com/uas/credit/model/abnormalinfo/AbnormalRoot.java

@@ -0,0 +1,50 @@
+package com.uas.credit.model.abnormalinfo;
+
+import com.uas.credit.model.debtinfo.EndeptinfoReport;
+
+import javax.persistence.*;
+
+/**
+ * @author: huyy
+ * @date: 2018/6/21 10:37
+ */
+@Entity
+@Table(name = "abnormal_root")
+public class AbnormalRoot {
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @Column(name = "id")
+    private Long id;
+
+    @Column(name = "status")
+    private Integer status;
+
+    @OneToOne(cascade = CascadeType.ALL)
+    @JoinColumn(name = "ar_id")
+    private AbnormalReport returnValue;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public AbnormalReport getReturnValue() {
+        return returnValue;
+    }
+
+    public void setReturnValue(AbnormalReport returnValue) {
+        this.returnValue = returnValue;
+    }
+}