toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
    json[r'_id'] = this.id;
    json[r'tenantId'] = this.tenantId;
    json[r'name'] = this.name;
    json[r'question'] = this.question;
  if (this.summaryLabel != null) {
    json[r'summaryLabel'] = this.summaryLabel;
  } else {
    json[r'summaryLabel'] = null;
  }
    json[r'helpText'] = this.helpText;
    json[r'createdAt'] = this.createdAt.toUtc().toIso8601String();
    json[r'createdBy'] = this.createdBy;
    json[r'usedCount'] = this.usedCount;
    json[r'lastUsed'] = this.lastUsed.toUtc().toIso8601String();
    json[r'type'] = this.type;
    json[r'numStars'] = this.numStars;
    json[r'min'] = this.min;
    json[r'max'] = this.max;
    json[r'defaultValue'] = this.defaultValue;
    json[r'labelNegative'] = this.labelNegative;
    json[r'labelPositive'] = this.labelPositive;
    json[r'customOptions'] = this.customOptions;
    json[r'subQuestionIds'] = this.subQuestionIds;
    json[r'alwaysShowSubQuestions'] = this.alwaysShowSubQuestions;
    json[r'reportingOrder'] = this.reportingOrder;
  return json;
}