toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
    json[r'user_id'] = this.userId;
    json[r'key'] = this.key;
  if (this.addedOn != null) {
    json[r'added_on'] = this.addedOn!.toUtc().toIso8601String();
  } else {
    json[r'added_on'] = null;
  }
  if (this.expiredOn != null) {
    json[r'expired_on'] = this.expiredOn!.toUtc().toIso8601String();
  } else {
    json[r'expired_on'] = null;
  }
  if (this.isAdmin != null) {
    json[r'is_admin'] = this.isAdmin;
  } else {
    json[r'is_admin'] = null;
  }
  if (this.active != null) {
    json[r'active'] = this.active;
  } else {
    json[r'active'] = null;
  }
  return json;
}