|
@@ -5,36 +5,14 @@ import androidx.room.Database
|
|
|
import androidx.room.Room
|
|
|
import androidx.room.RoomDatabase
|
|
|
import androidx.room.TypeConverters
|
|
|
-import com.ys.bdtp.adm.mvvm.model.db.dao.InfoDao
|
|
|
-import com.ys.bdtp.adm.mvvm.model.db.dao.ProblemArchDao
|
|
|
import com.ys.bdtp.adm.mvvm.model.db.entity.dict.ContainerConfigEntity
|
|
|
import com.framework.mvvm.model.db.entity.task.PipeEntity
|
|
|
import com.ys.bdtp.adm.mvvm.model.db.converter.GsonConverter
|
|
|
-import com.ys.bdtp.adm.mvvm.model.db.dao.ComponentDao
|
|
|
-import com.ys.bdtp.adm.mvvm.model.db.dao.ConfigDao
|
|
|
-import com.ys.bdtp.adm.mvvm.model.db.dao.ContainerConfigDao
|
|
|
-import com.ys.bdtp.adm.mvvm.model.db.dao.EquipmentDao
|
|
|
-import com.ys.bdtp.adm.mvvm.model.db.dao.FileDao
|
|
|
-import com.ys.bdtp.adm.mvvm.model.db.dao.InfosConfigDao
|
|
|
-import com.ys.bdtp.adm.mvvm.model.db.dao.JobSpaceDao
|
|
|
-import com.ys.bdtp.adm.mvvm.model.db.dao.M2dEquipDao
|
|
|
-import com.ys.bdtp.adm.mvvm.model.db.dao.MajorDao
|
|
|
-import com.ys.bdtp.adm.mvvm.model.db.dao.ObjectDao
|
|
|
-import com.ys.bdtp.adm.mvvm.model.db.dao.PipeConfigDao
|
|
|
-import com.ys.bdtp.adm.mvvm.model.db.dao.PipeDao
|
|
|
-import com.ys.bdtp.adm.mvvm.model.db.dao.ProblemEquipDao
|
|
|
-import com.ys.bdtp.adm.mvvm.model.db.dao.ProjectDao
|
|
|
-import com.ys.bdtp.adm.mvvm.model.db.dao.QrCodeDao
|
|
|
-import com.ys.bdtp.adm.mvvm.model.db.dao.RelConfigDao
|
|
|
-import com.ys.bdtp.adm.mvvm.model.db.dao.RelationDao
|
|
|
-import com.ys.bdtp.adm.mvvm.model.db.dao.RelationDictDao
|
|
|
-import com.ys.bdtp.adm.mvvm.model.db.dao.ServeAreaDao
|
|
|
-import com.ys.bdtp.adm.mvvm.model.db.dao.SystemDao
|
|
|
-import com.ys.bdtp.adm.mvvm.model.db.dao.UserDao
|
|
|
+import com.ys.bdtp.adm.mvvm.model.db.dao.*
|
|
|
import com.ys.bdtp.adm.mvvm.model.db.entity.ProjectEntity
|
|
|
import com.ys.bdtp.adm.mvvm.model.db.entity.UserEntity
|
|
|
import com.ys.bdtp.adm.mvvm.model.db.entity.dict.ComponentEntity
|
|
|
-import com.ys.bdtp.adm.mvvm.model.db.entity.dict.ConfigEntity
|
|
|
+import com.ys.bdtp.adm.mvvm.model.db.entity.dict.BasicConfigEntity
|
|
|
import com.ys.bdtp.adm.mvvm.model.db.entity.dict.EquipmentEntity
|
|
|
import com.ys.bdtp.adm.mvvm.model.db.entity.dict.InfoEntity
|
|
|
import com.ys.bdtp.adm.mvvm.model.db.entity.dict.InfosConfigEntity
|
|
@@ -44,14 +22,7 @@ import com.ys.bdtp.adm.mvvm.model.db.entity.dict.PipeConfigEntity
|
|
|
import com.ys.bdtp.adm.mvvm.model.db.entity.dict.RelConfigEntity
|
|
|
import com.ys.bdtp.adm.mvvm.model.db.entity.dict.RelationDictEntity
|
|
|
import com.ys.bdtp.adm.mvvm.model.db.entity.dict.SystemEntity
|
|
|
-import com.ys.bdtp.adm.mvvm.model.db.entity.task.FileEntity
|
|
|
-import com.ys.bdtp.adm.mvvm.model.db.entity.task.JobSpaceEntity
|
|
|
-import com.ys.bdtp.adm.mvvm.model.db.entity.task.ObjectEntity
|
|
|
-import com.ys.bdtp.adm.mvvm.model.db.entity.task.ProblemArchEntity
|
|
|
-import com.ys.bdtp.adm.mvvm.model.db.entity.task.ProblemEquipEntity
|
|
|
-import com.ys.bdtp.adm.mvvm.model.db.entity.task.QrCodeEntity
|
|
|
-import com.ys.bdtp.adm.mvvm.model.db.entity.task.RelationEntity
|
|
|
-import com.ys.bdtp.adm.mvvm.model.db.entity.task.ServeAreaEntity
|
|
|
+import com.ys.bdtp.adm.mvvm.model.db.entity.task.*
|
|
|
|
|
|
|
|
|
@Database(
|
|
@@ -64,21 +35,22 @@ import com.ys.bdtp.adm.mvvm.model.db.entity.task.ServeAreaEntity
|
|
|
PipeConfigEntity::class,
|
|
|
RelConfigEntity::class,
|
|
|
M2dEquipEntity::class,
|
|
|
- ConfigEntity::class,
|
|
|
+ BasicConfigEntity::class,
|
|
|
FileEntity::class,
|
|
|
JobSpaceEntity::class,
|
|
|
QrCodeEntity::class,
|
|
|
ObjectEntity::class,
|
|
|
ProjectEntity::class,
|
|
|
RelationEntity::class,
|
|
|
- ProblemArchEntity::class,
|
|
|
- ProblemEquipEntity::class,
|
|
|
+ ProblemEntity::class,
|
|
|
ComponentEntity::class,
|
|
|
PipeEntity::class,
|
|
|
ServeAreaEntity::class,
|
|
|
ContainerConfigEntity::class,
|
|
|
InfoEntity::class,
|
|
|
- UserEntity::class
|
|
|
+ UserEntity::class,
|
|
|
+ CustomInfoEntity::class,
|
|
|
+ CadEntity::class
|
|
|
], version = 1, exportSchema = true
|
|
|
)
|
|
|
@TypeConverters(GsonConverter::class)
|
|
@@ -91,8 +63,7 @@ abstract class AdmDatabase : RoomDatabase() {
|
|
|
abstract fun majorDao(): MajorDao
|
|
|
abstract fun objectDao(): ObjectDao
|
|
|
abstract fun pipeConfigDao(): PipeConfigDao
|
|
|
- abstract fun problemArchDao(): ProblemArchDao
|
|
|
- abstract fun problemEquipDao(): ProblemEquipDao
|
|
|
+ abstract fun problemDao(): ProblemDao
|
|
|
abstract fun projectDao(): ProjectDao
|
|
|
abstract fun qrCodeDao(): QrCodeDao
|
|
|
abstract fun relationDao(): RelationDao
|
|
@@ -106,6 +77,8 @@ abstract class AdmDatabase : RoomDatabase() {
|
|
|
abstract fun containerConfigDao(): ContainerConfigDao
|
|
|
abstract fun infoDao(): InfoDao
|
|
|
abstract fun userDao(): UserDao
|
|
|
+ abstract fun cadDao(): CadDao
|
|
|
+ abstract fun customInfoDao(): CustomInfoDao
|
|
|
|
|
|
companion object {
|
|
|
@Volatile
|