toMap method
Implementation
Map<String, dynamic> toMap() => <String, dynamic>{
"id": id,
"createdAt": createdAt.toIso8601String(),
"jsonData": jsonData.toMap(),
"tags": List<int>.from(tags.map((int x) => x)),
"creator": creator?.toMap(),
"creatorId": creatorId,
"title": title,
"cityCode": cityCode,
"address": address,
"phoneNumber": phoneNumber,
"adminUserIds": List<String>.from(adminUserIds.map((String x) => x)),
"averageScore": averageScore,
"commentCount": commentCount,
"minMonthlyRent": minMonthlyRent,
"bedCount": bedCount,
"availableBedCount": availableBedCount,
"rooms": rooms == null ? <UDormRoomResponse>[] : List<UDormRoomResponse>.from(rooms!.map((UDormRoomResponse x) => x.toMap())),
"beds": beds == null ? <UDormBedResponse>[] : List<UDormBedResponse>.from(beds!.map((UDormBedResponse x) => x.toMap())),
"comments": comments == null ? <UCommentResponse>[] : List<UCommentResponse>.from(comments!.map((UCommentResponse x) => x.toMap())),
"media": media == null ? <UMediaResponse>[] : List<UMediaResponse>.from(media!.map((UMediaResponse x) => x.toMap())),
};