Browse Source

@fun: add group_code

bai 2 years ago
parent
commit
421a598874

+ 2 - 1
app/src/main/java/com/ys/bdtp/adm/mvvm/model/db/entity/task/FileEntity.kt

@@ -3,7 +3,6 @@ package com.ys.bdtp.adm.mvvm.model.db.entity.task
 import androidx.room.ColumnInfo
 import androidx.room.Entity
 import androidx.room.PrimaryKey
-import com.ys.bdtp.adm.mvvm.model.db.entity.BaseEntity
 
 /**
  * 文件表
@@ -11,6 +10,7 @@ import com.ys.bdtp.adm.mvvm.model.db.entity.BaseEntity
  * @author bai
  *
  * @param id
+ * @param groupCode 集团编码
  * @param projectId
  * @param buildingId
  * @param floorId
@@ -35,6 +35,7 @@ import com.ys.bdtp.adm.mvvm.model.db.entity.BaseEntity
 @Entity(tableName = "file")
 data class FileEntity(
     @PrimaryKey @ColumnInfo(name = "id") val id: String,
+    @ColumnInfo(name = "group_code") val groupCode: String,
     @ColumnInfo(name = "project_id") val projectId: String,
     @ColumnInfo(name = "building_id") val buildingId: String,
     @ColumnInfo(name = "floor_id") val floorId: String,

+ 28 - 13
app/src/main/java/com/ys/bdtp/adm/mvvm/model/db/entity/task/QrCodeEntity.kt

@@ -3,23 +3,38 @@ package com.ys.bdtp.adm.mvvm.model.db.entity.task
 import androidx.room.ColumnInfo
 import androidx.room.Entity
 import androidx.room.PrimaryKey
-import com.ys.bdtp.adm.mvvm.model.db.entity.BaseEntity
 import com.google.gson.JsonElement
 
 /**
  * 二维码表
+ *
+ * @author bai
+ *
+ * @param groupCode 集团编码
+ * @param projectId
+ * @param buildingId
+ * @param floorId
+ * @param valid
+ * @param state
+ * @param ts
+ * @param qrCode 二维码数据值
+ * @param objId 二维码对应的对象id
+ * @param remark 描述信息
+ * @param location 位置坐标({x:1,y:1,z:1})
+ *
  */
 @Entity(tableName = "qr_code")
 data class QrCodeEntity(
-    @PrimaryKey @ColumnInfo(name = "id") override val id: String,
-    @ColumnInfo(name = "project_id") override val projectId: String,
-    @ColumnInfo(name = "building_id") override val buildingId: String,
-    @ColumnInfo(name = "floor_id") override val floorId: String,
-    @ColumnInfo(name = "state") override var state: Int = -1,
-    @ColumnInfo(name = "valid") override var valid: Int = 1,
-    @ColumnInfo(name = "ts") override val ts: Long = 0L,
-    @ColumnInfo(name = "qr_code") val qrCode: String = "",              // 二维码数据值
-    @ColumnInfo(name = "obj_id") val objId: String = "",                // 二维码对应的对象id
-    @ColumnInfo(name = "remark") val remark: String? = "",              // 描述信息
-    @ColumnInfo(name = "location") val location: JsonElement? = null,   // 位置坐标({x:1,y:1,z:1})
-) : BaseEntity
+    @PrimaryKey @ColumnInfo(name = "id") val id: String,
+    @ColumnInfo(name = "group_code") val groupCode: String,
+    @ColumnInfo(name = "project_id") val projectId: String,
+    @ColumnInfo(name = "building_id") val buildingId: String,
+    @ColumnInfo(name = "floor_id") val floorId: String,
+    @ColumnInfo(name = "state") var state: Int = -1,
+    @ColumnInfo(name = "valid") var valid: Int = 1,
+    @ColumnInfo(name = "ts") val ts: Long = 0L,
+    @ColumnInfo(name = "qr_code") val qrCode: String = "",
+    @ColumnInfo(name = "obj_id") val objId: String = "",
+    @ColumnInfo(name = "remark") val remark: String? = "",
+    @ColumnInfo(name = "location") val location: JsonElement? = null,
+)