Message

@Serializable
data class Message(val id: Int, val dateReceived: Long, val content: String, val sender: String, val chat: String, val file: URI? = null)

Room entity representing a message in a chat.

Constructors

Link copied to clipboard
constructor(id: Int, dateReceived: Long, content: String, sender: String, chat: String, file: URI? = null)

Properties

Link copied to clipboard

The chat/conversation ID this message belongs to.

Link copied to clipboard

The text content of the message.

Link copied to clipboard

Timestamp when the message was received.

Link copied to clipboard
@Serializable(with = URISerializable::class)
val file: URI?

Optional file attached to the message, stored as a URI.

Link copied to clipboard
val id: Int

Unique message ID (auto-generated).

Link copied to clipboard

The identifier of the sender.