Start creating database model

This commit is contained in:
ganfra 2018-10-12 16:50:54 +02:00
parent 06456ae3e9
commit 9bef41a13b
3 changed files with 39 additions and 0 deletions

View File

@ -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>
}

View File

@ -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
}

View File

@ -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>
}