toJson method
Implementation
Map<String, Object?> toJson({List<String> excepts = const []}) {
return {
if (!excepts.contains("id")) "id": id,
"message": message,
"createdAt": createdAt?.toIso8601String(),
"seenAt": seenAt?.toIso8601String(),
"read": read,
"status": messageStatusFromEnum[status],
"reference": reference,
};
}