toJson method

Map<String, dynamic> toJson()

Converts this SupabaseTableInfo instance to a JSON map for serialization.

Implementation

Map<String, dynamic> toJson() => {
  'name': name,
  'originalName': originalName,
  'localName': localName,
  'schema': schema,
  'columns': columns.map((c) => c.toJson()).toList(),
  'foreignKeys': foreignKeys.map((fk) => fk.toJson()).toList(),
  'indexes': indexes.map((idx) => idx.toJson()).toList(),
  'comment': comment,
  'reverseRelations':
      reverseRelations
          .map((rr) => rr.toJson())
          .toList(), // <<< ADDED TO toJson
};