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(),
'bandsFulfillment': bandsFulfillment?.map((bandFulfillment) => bandFulfillment.toJSON()).toList(),
'watchingProfiles': [],
'goingProfiles': [],
'isOnline': isOnline,
'isTest': isTest,
'participantsLimit': participantsLimit,
};