app / sg.edu.ntu.scse.cz2006.gymbuddies.datastruct / Chat

Chat

open class Chat

Data Structure to store the Chat data in FirebaseFirestore. For sg.edu.ntu.scse.cz2006.gymbuddies.datastruct in Gym Buddies!

Author
Chia Yu

Since
2019-10-22

Constructors

<init>

default constructor

Chat()

alternate constructor

Chat(lastMessage: String!, lastUpdate: Long, participant: HashMap<String!, Boolean!>!)

Properties

chatId

var chatId: String!

lastMessage

var lastMessage: String!

lastUpdate

var lastUpdate: Long

otherUser

var otherUser: User!

participant

var participant: HashMap<String!, Boolean!>!

Functions

getChatId

getter method for chat id

open fun getChatId(): String!

getLastMessage

getter method for last message

open fun getLastMessage(): String!

getLastUpdate

getter method to get last update timestamp

open fun getLastUpdate(): Long

getOtherUser

excluded to save otherUser attribute in FirebaseFirestore

open fun getOtherUser(): User!

getParticipant

getter method for member of the chat

open fun getParticipant(): HashMap<String!, Boolean!>!

setChatId

setter method for chat id

open fun setChatId(chatId: String!): Unit

setLastMessage

setter method for set lastMessage

open fun setLastMessage(lastMessage: String!): Unit

setLastUpdate

setter method to get last update timestamp

open fun setLastUpdate(lastUpdate: Long): Unit

setOtherUser

open fun setOtherUser(otherUser: User!): Unit

setParticipant

setter method member of the chat

open fun setParticipant(participant: HashMap<String!, Boolean!>!): Unit

toString

for display purpose only

open fun toString(): String