Converts the ChatModel instance to a JSON object.
Returns a map representing the JSON object.
Map<String, dynamic> toJson() => { 'chat': chat, 'message': message, 'time': time, };