Message

@Serializable
data class Message(    val userName: String,     val text: String,     val timeStamp: Long,     @BsonId val id: String = ObjectId().toString())

Represents a message in a chat application.

Parameters

userName

the username of the message sender.

text

the content of the message.

timeStamp

the timestamp of the message.

id

the unique identifier of the message.

Constructors

Link copied to clipboard
constructor(    userName: String,     text: String,     timeStamp: Long,     @BsonId id: String = ObjectId().toString())

Properties

Link copied to clipboard
val id: String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard