deason 6 lat temu
rodzic
commit
87e868e990

+ 1 - 0
examcloud-core-questions-dao/src/main/java/cn/com/qmth/examcloud/core/questions/dao/entity/CourseProperty.java

@@ -1,5 +1,6 @@
 package cn.com.qmth.examcloud.core.questions.dao.entity;
 
+import cn.com.qmth.examcloud.core.questions.dao.entity.base.IdEntity;
 import cn.com.qmth.examcloud.core.questions.dao.entity.dto.CoursePropertyDto;
 
 import javax.persistence.Entity;

+ 1 - 0
examcloud-core-questions-dao/src/main/java/cn/com/qmth/examcloud/core/questions/dao/entity/Property.java

@@ -1,5 +1,6 @@
 package cn.com.qmth.examcloud.core.questions.dao.entity;
 
+import cn.com.qmth.examcloud.core.questions.dao.entity.base.IdEntity;
 import cn.com.qmth.examcloud.core.questions.dao.entity.dto.PropertyDto;
 
 import javax.persistence.Entity;

+ 34 - 0
examcloud-core-questions-dao/src/main/java/cn/com/qmth/examcloud/core/questions/dao/entity/base/IdBase.java

@@ -0,0 +1,34 @@
+/*
+ * *************************************************
+ * Copyright (c) 2019 QMTH. All Rights Reserved.
+ * Created by Deason on 2019-05-05 14:12:35.
+ * *************************************************
+ */
+
+package cn.com.qmth.examcloud.core.questions.dao.entity.base;
+
+import org.springframework.data.annotation.Id;
+
+import java.io.Serializable;
+
+/**
+ * Mongo Object ID
+ *
+ * @author: fengdesheng
+ * @since: 2019/5/5
+ */
+public abstract class IdBase implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    @Id
+    protected String id;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+}

+ 2 - 2
examcloud-core-questions-dao/src/main/java/cn/com/qmth/examcloud/core/questions/dao/entity/IdEntity.java → examcloud-core-questions-dao/src/main/java/cn/com/qmth/examcloud/core/questions/dao/entity/base/IdEntity.java

@@ -1,11 +1,11 @@
 /*
  * *************************************************
  * Copyright (c) 2019 QMTH. All Rights Reserved.
- * Created by Deason on 2019-05-05 09:58:45.
+ * Created by Deason on 2019-05-05 14:12:39.
  * *************************************************
  */
 
-package cn.com.qmth.examcloud.core.questions.dao.entity;
+package cn.com.qmth.examcloud.core.questions.dao.entity.base;
 
 import javax.persistence.GeneratedValue;
 import javax.persistence.GenerationType;