package app.closer.domain.model

/**
 * A conversation in the Messages inbox. Either the pinned free-form couple chat ("main") or a
 * per-question discussion ("question"). [title]/[lastMessagePreview] are resolved/decrypted for
 * display; the stored preview is E2E-encrypted like every other message.
 */
data class Conversation(
    val id: String = "",
    val type: String = "main",          // "main" | "question"
    val questionId: String = "",        // set for question conversations
    val title: String = "",             // filled in by the ViewModel (partner name / question text)
    val lastMessagePreview: String = "",
    val lastMessageAt: Long = 0L,
    val lastMessageSenderId: String = "",
    val unread: Boolean = false
) {
    val isMain: Boolean get() = type == "main"
}
