toJson method
Implementation
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['created_date'] = createdDate;
map['last_updated_date'] = lastUpdatedDate;
map['_id'] = id;
map['tenant_id'] = tenantId;
map['is_deleted'] = isDeleted;
map['room_id'] = roomId;
map['member_type'] = memberType;
map['type'] = type;
map['action'] = action;
map['content'] = content;
map['kind'] = kind;
map['receiving_group_id'] = receivingGroupId;
map['uuid'] = uuid;
if (guestInfo != null) {
map['guest_info'] = guestInfo?.toJson();
}
if (multimedias != null) {
map['multimedias'] = multimedias?.map((v) => v.toJson()).toList();
}
if (reactions != null) {
map['reactions'] = reactions?.map((v) => v.toJson()).toList();
}
if (quoteMessage != null) {
map['quote_message'] = quoteMessage?.toJson();
}
return map;
}