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,
"capacity": capacity,
"pricePerNight": pricePerNight,
"roomNumber": roomNumber,
"quantity": quantity,
"isAvailable": isAvailable,
"hotelId": hotelId,
"hotel": hotel?.toMap(),
"reservations": reservations == null ? <UHotelReservationResponse>[] : List<UHotelReservationResponse>.from(reservations!.map((UHotelReservationResponse x) => x.toMap())),
"media": media == null ? <UMediaResponse>[] : List<UMediaResponse>.from(media!.map((UMediaResponse x) => x.toMap())),
"adminUserIds": List<dynamic>.from(adminUserIds.map((String x) => x)),
};