class PastSessionModel { bool? success; String? message; Result? result; PastSessionModel({this.success, this.message, this.result}); PastSessionModel.fromJson(Map json) { success = json['success']; message = json['message']; result = json['result'] != null ? Result.fromJson(json['result']) : null; } Map toJson() { final Map data = {}; data['success'] = success; data['message'] = message; if (result != null) { data['result'] = result!.toJson(); } return data; } } class Result { int? id; String? activityName; String? title; String? mainActivityBanner; String? description; String? startDate; String? endDate; int? teacherId; String? faqsId; String? teaserUrl; String? benefits; String? preRequisites; int? subscriptionId; String? isActive; String? deletedAt; String? createdAt; String? updatedAt; List? schedule; Result( {this.id, this.activityName, this.title, this.mainActivityBanner, this.description, this.startDate, this.endDate, this.teacherId, this.faqsId, this.teaserUrl, this.benefits, this.preRequisites, this.subscriptionId, this.isActive, this.deletedAt, this.createdAt, this.updatedAt, this.schedule}); Result.fromJson(Map json) { id = json['id']; activityName = json['activity_name']; title = json['title']; mainActivityBanner = json['main_activity_banner']; description = json['description']; startDate = json['start_date']; endDate = json['end_date']; teacherId = json['teacher_id']; faqsId = json['faqs_id']; teaserUrl = json['teaser_url']; benefits = json['benefits']; preRequisites = json['pre_requisites']; subscriptionId = json['subscription_id']; isActive = json['is_active']; deletedAt = json['deleted_at']; createdAt = json['created_at']; updatedAt = json['updated_at']; if (json['schedule'] != null) { schedule = []; json['schedule'].forEach((v) { schedule!.add(Schedule.fromJson(v)); }); } } Map toJson() { final Map data = {}; data['id'] = id; data['activity_name'] = activityName; data['title'] = title; data['main_activity_banner'] = mainActivityBanner; data['description'] = description; data['start_date'] = startDate; data['end_date'] = endDate; data['teacher_id'] = teacherId; data['faqs_id'] = faqsId; data['teaser_url'] = teaserUrl; data['benefits'] = benefits; data['pre_requisites'] = preRequisites; data['subscription_id'] = subscriptionId; data['is_active'] = isActive; data['deleted_at'] = deletedAt; data['created_at'] = createdAt; data['updated_at'] = updatedAt; if (schedule != null) { data['schedule'] = schedule!.map((v) => v.toJson()).toList(); } return data; } } class Schedule { int? id; int? activityMasterId; String? activityName; String? activityTeaser; String? activityLevel; String? description; String? startDate; String? endDate; int? subscriptionId; String? isActive; String? deletedAt; String? createdAt; String? updatedAt; List? pastData; Schedule( {this.id, this.activityMasterId, this.activityName, this.activityTeaser, this.activityLevel, this.description, this.startDate, this.endDate, this.subscriptionId, this.isActive, this.deletedAt, this.createdAt, this.updatedAt, this.pastData}); Schedule.fromJson(Map json) { id = json['id']; activityMasterId = json['activity_master_id']; activityName = json['activity_name']; activityTeaser = json['activity_teaser']; activityLevel = json['activity_level']; description = json['description']; startDate = json['start_date']; endDate = json['end_date']; subscriptionId = json['subscription_id']; isActive = json['is_active']; deletedAt = json['deleted_at']; createdAt = json['created_at']; updatedAt = json['updated_at']; if (json['past_data'] != null) { pastData = []; json['past_data'].forEach((v) { pastData!.add(PastData.fromJson(v)); }); } } Map toJson() { final Map data = {}; data['id'] = id; data['activity_master_id'] = activityMasterId; data['activity_name'] = activityName; data['activity_teaser'] = activityTeaser; data['activity_level'] = activityLevel; data['description'] = description; data['start_date'] = startDate; data['end_date'] = endDate; data['subscription_id'] = subscriptionId; data['is_active'] = isActive; data['deleted_at'] = deletedAt; data['created_at'] = createdAt; data['updated_at'] = updatedAt; if (pastData != null) { data['past_data'] = pastData!.map((v) => v.toJson()).toList(); } return data; } } class PastData { int? id; int? activityMasterId; int? activityScheduleId; String? activityName; String? image; String? url; int? duration; String? date; String? day; String? deletedAt; String? createdAt; String? updatedAt; PastData( {this.id, this.activityMasterId, this.activityScheduleId, this.activityName, this.image, this.url, this.duration, this.date, this.day, this.deletedAt, this.createdAt, this.updatedAt}); PastData.fromJson(Map json) { id = json['id']; activityMasterId = json['activity_master_id']; activityScheduleId = json['activity_schedule_id']; activityName = json['activity_name']; image = json['image']; url = json['url']; duration = json['duration']; date = json['date']; day = json['day']; deletedAt = json['deleted_at']; createdAt = json['created_at']; updatedAt = json['updated_at']; } Map toJson() { final Map data = {}; data['id'] = id; data['activity_master_id'] = activityMasterId; data['activity_schedule_id'] = activityScheduleId; data['activity_name'] = activityName; data['image'] = image; data['url'] = url; data['duration'] = duration; data['date'] = date; data['day'] = day; data['deleted_at'] = deletedAt; data['created_at'] = createdAt; data['updated_at'] = updatedAt; return data; } }