toMap method

Map<String, Object?> toMap()

Implementation

Map<String, Object?> toMap() => {
      'name': name,
      if (pluralName != null) 'pluralName': pluralName,
      if (authRules != null)
        'authRules': authRules?.map((x) => x.toMap()).toList(),
      if (fields != null)
        'fields': fields?.map((key, value) => MapEntry(key, value.toMap())),
      if (indexes != null)
        'indexes': indexes?.map((value) => value.toJson()).toList(),
    };