Message

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

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.