toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() => {
      "id": id,
      "user_id": userId,
      "name": name,
      "event_image": eventImage,
      "start_date": "${startDate!.year.toString().padLeft(4, '0')}-${startDate!.month.toString().padLeft(2, '0')}-${startDate!.day.toString().padLeft(2, '0')}",
      "end_date": "${endDate!.year.toString().padLeft(4, '0')}-${endDate!.month.toString().padLeft(2, '0')}-${endDate!.day.toString().padLeft(2, '0')}",
      "start_time": startTime,
      "end_time": endTime,
      "booking_limit": bookingLimit,
      "left_booking_count": leftBookingCount,
      // "actual_price": actualPrice,
      "price": price,
      // "description": description,
      // "contact_number": contactNumber,
      "discount": discount,
      "discount_type": discountType,
      "address": address,
      // "country": country,
      // "state": state,
      "city": city,
      "latitude": latitude,
      "longitude": longitude,
      "postal_code": postalCode,
      "status": status,
      "is_featured": isFeatured,
      "status_text": statusText,
      "is_favourite": isFavourite,
      "total_rating": totalRating,
      // "avg_rating": avgRating,
      // "rating": rating == null ? [] : List<dynamic>.from(rating!.map((x) => x.toJson())),
      // "about_event": aboutEvent == null ? [] : List<dynamic>.from(aboutEvent!.map((x) => x.toJson())),
      // "event_faqs": eventFaqs == null ? [] : List<dynamic>.from(eventFaqs!.map((x) => x.toJson())),
      // "business": business?.toJson(),
      "music_type_id": musicTypeId,
      "music_type": musicType == null ? [] : List<dynamic>.from(musicType!.map((x) => x.toMap())),
      "artists_id": artistId,
      // "artists": artists == null ? [] : List<dynamic>.from(artists!.map((x) => x.toJson())),
      // "gallery_attachment_array": galleryAttachmentArray == null ? [] : List<dynamic>.from(galleryAttachmentArray!.map((x) => x)),
      "is_today": isToday,
      "is_tomorrow": isTomorrow,
      "is_weekend": isWeekEnd,
      "updated_at": updatedAt
    };