toJson method
Implementation
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['id'] = id;
data['createdAt'] = createdAt;
data['message'] = message;
if (user != null) {
data['user'] = user!.toJson();
}
// if (files != null) {
// data['files'] = files!.map((v) => v.toJson()).toList();
// }
return data;
}