toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  if (this.id != null) {
    json[r'id'] = this.id;
  } else {
    json[r'id'] = null;
  }
  if (this.startDate != null) {
    json[r'start_date'] = _dateFormatter.format(this.startDate!.toUtc());
  } else {
    json[r'start_date'] = null;
  }
  if (this.endDate != null) {
    json[r'end_date'] = _dateFormatter.format(this.endDate!.toUtc());
  } else {
    json[r'end_date'] = null;
  }
  if (this.subject != null) {
    json[r'subject'] = this.subject;
  } else {
    json[r'subject'] = null;
  }
  if (this.level != null) {
    json[r'level'] = this.level;
  } else {
    json[r'level'] = null;
  }
  if (this.numWeeks != null) {
    json[r'num_weeks'] = this.numWeeks;
  } else {
    json[r'num_weeks'] = null;
  }
  if (this.maxSeats != null) {
    json[r'max_seats'] = this.maxSeats;
  } else {
    json[r'max_seats'] = null;
  }
  if (this.weeklyPriceCents != null) {
    json[r'weekly_price_cents'] = this.weeklyPriceCents;
  } else {
    json[r'weekly_price_cents'] = null;
  }
  if (this.courseName != null) {
    json[r'course_name'] = this.courseName;
  } else {
    json[r'course_name'] = null;
  }
  if (this.description != null) {
    json[r'description'] = this.description;
  } else {
    json[r'description'] = null;
  }
  if (this.image != null) {
    json[r'image'] = this.image;
  } else {
    json[r'image'] = null;
  }
  if (this.status != null) {
    json[r'status'] = this.status;
  } else {
    json[r'status'] = null;
  }
  if (this.customerCount != null) {
    json[r'customer_count'] = this.customerCount;
  } else {
    json[r'customer_count'] = null;
  }
  if (this.customers != null) {
    json[r'customers'] = this.customers;
  } else {
    json[r'customers'] = null;
  }
  if (this.tutor != null) {
    json[r'tutor'] = this.tutor;
  } else {
    json[r'tutor'] = null;
  }
  if (this.courses != null) {
    json[r'courses'] = this.courses;
  } else {
    json[r'courses'] = null;
  }
  if (this.timeZone != null) {
    json[r'time_zone'] = this.timeZone;
  } else {
    json[r'time_zone'] = null;
  }
  if (this.publishStatus != null) {
    json[r'publish_status'] = this.publishStatus;
  } else {
    json[r'publish_status'] = null;
  }
  if (this.canEnroll != null) {
    json[r'can_enroll'] = this.canEnroll;
  } else {
    json[r'can_enroll'] = null;
  }
  return json;
}