mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-22 14:38:15 +08:00
Start creating database model
This commit is contained in:
parent
06456ae3e9
commit
9bef41a13b
@ -0,0 +1,13 @@
|
||||
package im.vector.matrix.android.internal.database.model
|
||||
|
||||
import io.objectbox.annotation.Entity
|
||||
import io.objectbox.annotation.Id
|
||||
import io.objectbox.relation.ToMany
|
||||
|
||||
@Entity
|
||||
class ChunkEntity {
|
||||
@Id var id: Long = 0
|
||||
var prevToken: String? = null
|
||||
var nextToken: String? = null
|
||||
lateinit var events: ToMany<EventEntity>
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package im.vector.matrix.android.internal.database.model
|
||||
|
||||
import io.objectbox.annotation.Entity
|
||||
import io.objectbox.annotation.Id
|
||||
|
||||
@Entity
|
||||
class EventEntity {
|
||||
@Id var id: Long = 0
|
||||
lateinit var eventId: String
|
||||
lateinit var type: String
|
||||
lateinit var content: String
|
||||
var prevContent: String? = null
|
||||
var stateKey: String? = null
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package im.vector.matrix.android.internal.database.model
|
||||
|
||||
import io.objectbox.annotation.Entity
|
||||
import io.objectbox.annotation.Id
|
||||
import io.objectbox.relation.ToMany
|
||||
|
||||
@Entity
|
||||
class RoomEntity {
|
||||
@Id var id: Long = 0
|
||||
lateinit var roomId: String
|
||||
lateinit var chunks: ToMany<ChunkEntity>
|
||||
}
|
Loading…
Reference in New Issue
Block a user