package ru.forbion.f7cloud.feature.talk

import androidx.room.Entity
import androidx.room.PrimaryKey

@Entity(tableName = "talk_rooms")
data class TalkRoomEntity(
    @PrimaryKey val token: String,
    val displayName: String,
    val type: Int,
    val unreadMessages: Int,
    val hasCall: Boolean,
    val isFavorite: Boolean,
    val lastActivity: Long,
    val lastMessagePreview: String,
    val syncedAt: Long,
)

@Entity(tableName = "talk_messages")
data class TalkMessageEntity(
    @PrimaryKey val id: Long,
    val roomToken: String,
    val actorDisplayName: String,
    val actorId: String,
    val text: String,
    val timestamp: Long,
    val messageType: String,
    val replyToId: Long?,
    val reactionsJson: String?,
    val messageParametersJson: String? = null,
)
