|
|
|
@ -9,13 +9,18 @@ class SurveyModel {
|
|
|
|
dynamic pageNo;
|
|
|
|
dynamic pageNo;
|
|
|
|
dynamic languageId;
|
|
|
|
dynamic languageId;
|
|
|
|
|
|
|
|
|
|
|
|
SurveyModel({this.surveyId, this.referenceNo, this.title, this.description, this.questions, this.isActive, this.pageSize, this.pageNo, this.languageId});
|
|
|
|
String? descriptionAr;
|
|
|
|
|
|
|
|
String? titleAr;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SurveyModel({this.surveyId, this.referenceNo, this.title,this.titleAr, this.description, this.descriptionAr, this.questions, this.isActive, this.pageSize, this.pageNo, this.languageId});
|
|
|
|
|
|
|
|
|
|
|
|
SurveyModel.fromJson(Map<String, dynamic> json) {
|
|
|
|
SurveyModel.fromJson(Map<String, dynamic> json) {
|
|
|
|
surveyId = json['surveyId'];
|
|
|
|
surveyId = json['surveyId'];
|
|
|
|
referenceNo = json['referenceNo'];
|
|
|
|
referenceNo = json['referenceNo'];
|
|
|
|
title = json['title'];
|
|
|
|
title = json['title'];
|
|
|
|
|
|
|
|
titleAr = json['titleAr'];
|
|
|
|
description = json['description'];
|
|
|
|
description = json['description'];
|
|
|
|
|
|
|
|
descriptionAr = json['descriptionAr'];
|
|
|
|
if (json['questions'] != null) {
|
|
|
|
if (json['questions'] != null) {
|
|
|
|
questions = <Questions>[];
|
|
|
|
questions = <Questions>[];
|
|
|
|
json['questions'].forEach((v) {
|
|
|
|
json['questions'].forEach((v) {
|
|
|
|
@ -33,7 +38,9 @@ class SurveyModel {
|
|
|
|
data['surveyId'] = this.surveyId;
|
|
|
|
data['surveyId'] = this.surveyId;
|
|
|
|
data['referenceNo'] = this.referenceNo;
|
|
|
|
data['referenceNo'] = this.referenceNo;
|
|
|
|
data['title'] = this.title;
|
|
|
|
data['title'] = this.title;
|
|
|
|
|
|
|
|
data['titleAr'] = this.titleAr;
|
|
|
|
data['description'] = this.description;
|
|
|
|
data['description'] = this.description;
|
|
|
|
|
|
|
|
data['descriptionAr'] = this.descriptionAr;
|
|
|
|
if (this.questions != null) {
|
|
|
|
if (this.questions != null) {
|
|
|
|
data['questions'] = this.questions!.map((v) => v.toJson()).toList();
|
|
|
|
data['questions'] = this.questions!.map((v) => v.toJson()).toList();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -48,6 +55,7 @@ class SurveyModel {
|
|
|
|
class Questions {
|
|
|
|
class Questions {
|
|
|
|
int? questionId;
|
|
|
|
int? questionId;
|
|
|
|
String? title;
|
|
|
|
String? title;
|
|
|
|
|
|
|
|
String? titleAr;
|
|
|
|
bool? isRequired;
|
|
|
|
bool? isRequired;
|
|
|
|
String? type;
|
|
|
|
String? type;
|
|
|
|
int? sequenceNo;
|
|
|
|
int? sequenceNo;
|
|
|
|
@ -59,11 +67,12 @@ class Questions {
|
|
|
|
dynamic pageNo;
|
|
|
|
dynamic pageNo;
|
|
|
|
dynamic languageId;
|
|
|
|
dynamic languageId;
|
|
|
|
|
|
|
|
|
|
|
|
Questions({this.questionId, this.title, this.isRequired, this.type, this.sequenceNo, this.surveyId, this.options, this.rspPercentage, this.isActive, this.pageSize, this.pageNo, this.languageId});
|
|
|
|
Questions({this.questionId, this.title, this.titleAr, this.isRequired, this.type, this.sequenceNo, this.surveyId, this.options, this.rspPercentage, this.isActive, this.pageSize, this.pageNo, this.languageId});
|
|
|
|
|
|
|
|
|
|
|
|
Questions.fromJson(Map<String, dynamic> json) {
|
|
|
|
Questions.fromJson(Map<String, dynamic> json) {
|
|
|
|
questionId = json['questionId'];
|
|
|
|
questionId = json['questionId'];
|
|
|
|
title = json['title'];
|
|
|
|
title = json['title'];
|
|
|
|
|
|
|
|
titleAr = json['titleAr'];
|
|
|
|
isRequired = json['isRequired'];
|
|
|
|
isRequired = json['isRequired'];
|
|
|
|
type = json['type'];
|
|
|
|
type = json['type'];
|
|
|
|
sequenceNo = json['sequenceNo'];
|
|
|
|
sequenceNo = json['sequenceNo'];
|
|
|
|
@ -85,6 +94,7 @@ class Questions {
|
|
|
|
Map<String, dynamic> data = new Map<String, dynamic>();
|
|
|
|
Map<String, dynamic> data = new Map<String, dynamic>();
|
|
|
|
data['questionId'] = this.questionId;
|
|
|
|
data['questionId'] = this.questionId;
|
|
|
|
data['title'] = this.title;
|
|
|
|
data['title'] = this.title;
|
|
|
|
|
|
|
|
data['titleAr'] = this.titleAr;
|
|
|
|
data['isRequired'] = this.isRequired;
|
|
|
|
data['isRequired'] = this.isRequired;
|
|
|
|
data['type'] = this.type;
|
|
|
|
data['type'] = this.type;
|
|
|
|
data['sequenceNo'] = this.sequenceNo;
|
|
|
|
data['sequenceNo'] = this.sequenceNo;
|
|
|
|
@ -104,6 +114,7 @@ class Questions {
|
|
|
|
class Options {
|
|
|
|
class Options {
|
|
|
|
int? optionId;
|
|
|
|
int? optionId;
|
|
|
|
String? title;
|
|
|
|
String? title;
|
|
|
|
|
|
|
|
String? titleAr;
|
|
|
|
bool? isCommentsRequired;
|
|
|
|
bool? isCommentsRequired;
|
|
|
|
int? sequenceNo;
|
|
|
|
int? sequenceNo;
|
|
|
|
int? questionId;
|
|
|
|
int? questionId;
|
|
|
|
@ -114,11 +125,12 @@ class Options {
|
|
|
|
dynamic pageNo;
|
|
|
|
dynamic pageNo;
|
|
|
|
dynamic languageId;
|
|
|
|
dynamic languageId;
|
|
|
|
|
|
|
|
|
|
|
|
Options({this.optionId, this.title, this.isCommentsRequired, this.sequenceNo, this.questionId, this.rspPercentage, this.count, this.isActive, this.pageSize, this.pageNo, this.languageId});
|
|
|
|
Options({this.optionId, this.title,this.titleAr, this.isCommentsRequired, this.sequenceNo, this.questionId, this.rspPercentage, this.count, this.isActive, this.pageSize, this.pageNo, this.languageId});
|
|
|
|
|
|
|
|
|
|
|
|
Options.fromJson(Map<String, dynamic> json) {
|
|
|
|
Options.fromJson(Map<String, dynamic> json) {
|
|
|
|
optionId = json['optionId'];
|
|
|
|
optionId = json['optionId'];
|
|
|
|
title = json['title'];
|
|
|
|
title = json['title'];
|
|
|
|
|
|
|
|
titleAr = json['titleAr'];
|
|
|
|
isCommentsRequired = json['isCommentsRequired'];
|
|
|
|
isCommentsRequired = json['isCommentsRequired'];
|
|
|
|
sequenceNo = json['sequenceNo'];
|
|
|
|
sequenceNo = json['sequenceNo'];
|
|
|
|
questionId = json['questionId'];
|
|
|
|
questionId = json['questionId'];
|
|
|
|
@ -134,6 +146,7 @@ class Options {
|
|
|
|
Map<String, dynamic> data = new Map<String, dynamic>();
|
|
|
|
Map<String, dynamic> data = new Map<String, dynamic>();
|
|
|
|
data['optionId'] = this.optionId;
|
|
|
|
data['optionId'] = this.optionId;
|
|
|
|
data['title'] = this.title;
|
|
|
|
data['title'] = this.title;
|
|
|
|
|
|
|
|
data['titleAr'] = this.titleAr;
|
|
|
|
data['isCommentsRequired'] = this.isCommentsRequired;
|
|
|
|
data['isCommentsRequired'] = this.isCommentsRequired;
|
|
|
|
data['sequenceNo'] = this.sequenceNo;
|
|
|
|
data['sequenceNo'] = this.sequenceNo;
|
|
|
|
data['questionId'] = this.questionId;
|
|
|
|
data['questionId'] = this.questionId;
|
|
|
|
|