toJson method
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;
}
json[r'weekly_price_cents'] = this.weeklyPriceCents;
json[r'course_name'] = this.courseName;
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;
}
json[r'status'] = this.status;
if (this.customer != null) {
json[r'customer'] = this.customer;
} else {
json[r'customer'] = 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;
}
json[r'time_zone'] = this.timeZone;
if (this.publishStatus != null) {
json[r'publish_status'] = this.publishStatus;
} else {
json[r'publish_status'] = null;
}
if (this.chat != null) {
json[r'chat'] = this.chat;
} else {
json[r'chat'] = null;
}
if (this.feedbackId != null) {
json[r'feedback_id'] = this.feedbackId;
} else {
json[r'feedback_id'] = null;
}
return json;
}