package io.nexilis.service.data.entities

import androidx.room.Entity
import androidx.room.Index

@Entity(
    primaryKeys = ["message_id"],
    indices = [
        Index(value = ["opposite_pin", "chat_id", "server_date", "account_type", "mail_account", "reff_id", "local_timestamp", "is_call_center"])
    ]
)
data class Message(
    val message_id: String,
    val f_pin: String,
    val l_pin: String,
    val message_scope_id: String,
    val server_date: Long,
    val status: String,
    val message_text: String,
    val audio_id: String = "",
    val video_id: String = "",
    val image_id: String = "",
    val thumb_id: String = "",
    val opposite_pin: String,
    val lock: String = "",
    val format: String = "",
    val broadcast_flag: Int = 0,
    val blog_id: String = "",
    val f_user_id: String = "",
    val l_user_id: String = "",
    val read_receipts: Int = 0,
    val chat_id: String = "",
    val file_id: String = "",
    val delivery_receipts: Int = 0,
    val account_type: String = "",
    val contact: String = "",
    val credential: String = "",
    val attachment_flag: Int = 0,
    val is_stared: Int = 0,
    val f_display_name: String,
    val reff_id: String = "",
    val sent_qty: Int = 0,
    val delivered_qty: Int = 0,
    val read_qty: Int = 0,
    val ack_qty: Int = 0,
    val read_local_qty: Int = 0,
    val delivered_pin: String = "",
    val read_pin: String = "",
    val ack_pin: String = "",
    val read_local_pin: String = "",
    val expired_qty: String = "",
    val message_large_text: String,
    val tag_forum: String = "",
    val tag_activity: String = "",
    val unk_numbers: Int = 0,
    val conn_state: Int = 1,
    val tag_client: String = "",
    val tag_subactivity: String = "",
    val messagenumber: Int = 0,
    val mail_account: String = "",
    val message_text_plain: String,
    val local_timestamp: Long = 0,
    val is_consult: Int = 0,
    val is_call_center: Int = 0,
    val call_center_id: String = "",
    val is_work_mode: Int = 0
) : MainEntity