toMap method

Map<String, dynamic> toMap()

Implementation

Map<String, dynamic> toMap() => <String, dynamic>{
  "id": id,
  "createdAt": createdAt.toIso8601String(),
  "jsonData": jsonData.toMap(),
  "tags": List<dynamic>.from(tags.map((int x) => x)),
  "startDate": startDate.toIso8601String(),
  "endDate": endDate.toIso8601String(),
  "deposit": deposit,
  "rent": rent,
  "user": user?.toMap(),
  "userId": userId,
  "bedId": bedId,
  "bed": bed?.toMap(),
  "creator": creator?.toMap(),
  "creatorId": creatorId,
  "isActive": isActive,
  "invoices": invoices == null ? <dynamic>[] : List<dynamic>.from(invoices!.map((UDormBedInvoiceResponse x) => x.toMap())),
  "adminUserIds": List<dynamic>.from(adminUserIds.map((String x) => x)),
};