toJSON method
Implementation
Map<String, dynamic> toJSON() => {
'id': id,
'name': name,
'description': description,
'ownerId': ownerId,
'ownerName': ownerName,
'ownerEmail': ownerEmail,
'imgUrl': imgUrl,
'coverImgUrl': coverImgUrl,
'public': public,
'createdTime': createdTime,
'eventDate': eventDate,
'reason': reason.name,
'appMediaItems': appMediaItems?.map((appMediaItem) => appMediaItem.toJSON()).toList(),
'genres': genres,
'itemPercentageCoverage': itemPercentageCoverage,
'distanceKm': distanceKm,
'paymentPrice': paymentPrice?.toJSON() ?? Price().toJSON(),
'coverPrice': coverPrice?.toJSON() ?? Price().toJSON(),
'type': type.name,
'status': status.name,
'position': jsonEncode(position),
'place': place?.toJSON() ?? Place().toJSON(),
'isFulfilled': isFulfilled,
'instrumentsFulfillment': instrumentsFulfillment?.map((instrumentFulfillment) => instrumentFulfillment.toJSON()).toList(),
'collectivesFulfillment': collectivesFulfillment?.map((collectiveFulfillment) => collectiveFulfillment.toJSON()).toList(),
'watchingProfiles': watchingProfiles ?? [],
'goingProfiles': goingProfiles ?? [],
'isOnline': isOnline,
'url': url,
'isTest': isTest,
'isOutdoor': isOutdoor,
'guestsLimit': guestsLimit,
'isEdited': isEdited,
'slug': slug,
'isRecurring': isRecurring,
'recurringDays': recurringDays,
'recurringTime': recurringTime,
'roomId': roomId,
'googleCalendarId': googleCalendarId,
};