You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
84 lines
2.2 KiB
Dart
84 lines
2.2 KiB
Dart
|
3 years ago
|
class MarathonDetailModel {
|
||
|
|
String? id;
|
||
|
|
String? titleEn;
|
||
|
|
String? titleAr;
|
||
|
|
String? descEn;
|
||
|
|
String? descAr;
|
||
|
|
int? winDeciderTime;
|
||
|
|
int? winnersCount;
|
||
|
|
int? questGapTime;
|
||
|
|
String? startTime;
|
||
|
|
String? endTime;
|
||
|
|
int? marathoneStatusId;
|
||
|
|
String? scheduleTime;
|
||
|
|
int? selectedLanguage;
|
||
|
|
List? projects;
|
||
|
|
List? sponsors;
|
||
|
|
List? questions;
|
||
|
|
|
||
|
|
MarathonDetailModel(
|
||
|
|
{id,
|
||
|
|
titleEn,
|
||
|
|
titleAr,
|
||
|
|
descEn,
|
||
|
|
descAr,
|
||
|
|
winDeciderTime,
|
||
|
|
winnersCount,
|
||
|
|
questGapTime,
|
||
|
|
startTime,
|
||
|
|
endTime,
|
||
|
|
marathoneStatusId,
|
||
|
|
scheduleTime,
|
||
|
|
selectedLanguage,
|
||
|
|
projects,
|
||
|
|
sponsors,
|
||
|
|
questions});
|
||
|
|
|
||
|
|
MarathonDetailModel.fromJson(Map<String, dynamic> json) {
|
||
|
|
id = json['id'];
|
||
|
|
titleEn = json['titleEn'];
|
||
|
|
titleAr = json['titleAr'];
|
||
|
|
descEn = json['descEn'];
|
||
|
|
descAr = json['descAr'];
|
||
|
|
winDeciderTime = json['winDeciderTime'];
|
||
|
|
winnersCount = json['winnersCount'];
|
||
|
|
questGapTime = json['questGapTime'];
|
||
|
|
startTime = json['startTime'];
|
||
|
|
endTime = json['endTime'];
|
||
|
|
marathoneStatusId = json['marathoneStatusId'];
|
||
|
|
scheduleTime = json['scheduleTime'];
|
||
|
|
selectedLanguage = json['selectedLanguage'];
|
||
|
|
projects = json['projects'];
|
||
|
|
sponsors = json['sponsors'];
|
||
|
|
if (json['questions'] != null) {
|
||
|
|
questions = <Null>[];
|
||
|
|
json['questions'].forEach((v) {
|
||
|
|
// questions!.add( Null.fromJson(v));
|
||
|
|
});
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
Map<String, dynamic> toJson() {
|
||
|
|
Map<String, dynamic> data = new Map<String, dynamic>();
|
||
|
|
data['id'] = id;
|
||
|
|
data['titleEn'] = titleEn;
|
||
|
|
data['titleAr'] = titleAr;
|
||
|
|
data['descEn'] = descEn;
|
||
|
|
data['descAr'] = descAr;
|
||
|
|
data['winDeciderTime'] = winDeciderTime;
|
||
|
|
data['winnersCount'] = winnersCount;
|
||
|
|
data['questGapTime'] = questGapTime;
|
||
|
|
data['startTime'] = startTime;
|
||
|
|
data['endTime'] = endTime;
|
||
|
|
data['marathoneStatusId'] = marathoneStatusId;
|
||
|
|
data['scheduleTime'] = scheduleTime;
|
||
|
|
data['selectedLanguage'] = selectedLanguage;
|
||
|
|
data['projects'] = projects;
|
||
|
|
data['sponsors'] = sponsors;
|
||
|
|
if (questions != null) {
|
||
|
|
data['questions'] = questions!.map((v) => v.toJson()).toList();
|
||
|
|
}
|
||
|
|
return data;
|
||
|
|
}
|
||
|
|
}
|