2019-07-05 12:39:15 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2019 New Vector Ltd
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
|
|
|
package im.vector.matrix.android.internal.database.model
|
|
|
|
|
|
|
|
import io.realm.RealmObject
|
2019-07-05 14:07:12 +00:00
|
|
|
import io.realm.RealmResults
|
2019-07-05 12:39:15 +00:00
|
|
|
import io.realm.annotations.Index
|
2019-07-05 14:07:12 +00:00
|
|
|
import io.realm.annotations.LinkingObjects
|
2019-07-05 12:39:15 +00:00
|
|
|
|
|
|
|
|
2019-07-10 17:14:06 +00:00
|
|
|
internal open class TimelineEventEntity(var localId: Long = 0,
|
2019-07-05 12:39:15 +00:00
|
|
|
@Index var eventId: String = "",
|
2019-07-05 14:07:12 +00:00
|
|
|
@Index var roomId: String = "",
|
2019-07-05 12:39:15 +00:00
|
|
|
var root: EventEntity? = null,
|
|
|
|
var annotations: EventAnnotationsSummaryEntity? = null,
|
|
|
|
var senderName: String? = null,
|
|
|
|
var isUniqueDisplayName: Boolean = false,
|
2019-07-08 13:32:24 +00:00
|
|
|
var senderAvatar: String? = null,
|
2019-08-08 12:32:11 +00:00
|
|
|
var senderMembershipEvent: EventEntity? = null,
|
2019-08-20 16:30:24 +00:00
|
|
|
var readReceipts: ReadReceiptsSummaryEntity? = null,
|
|
|
|
var readMarker: ReadMarkerEntity? = null
|
2019-07-05 12:39:15 +00:00
|
|
|
) : RealmObject() {
|
|
|
|
|
2019-07-05 14:07:12 +00:00
|
|
|
@LinkingObjects("timelineEvents")
|
|
|
|
val chunk: RealmResults<ChunkEntity>? = null
|
|
|
|
|
2019-07-05 12:39:15 +00:00
|
|
|
companion object
|
|
|
|
|
|
|
|
}
|