toMap method

Map<String, dynamic> toMap()

Converts this Chat instance to a Map for Firestore storage.

Implementation

Map<String, dynamic> toMap() {
  return {
    'chatId': chatId,
    'customerId': customerId,
    'nutritionistId': nutritionistId,
    'lastMessage': lastMessage,
    'lastMessageTime': lastMessageTime.toIso8601String(),
  };
}