toJson method
Returns a serialized JSON structure of the model which also includes fields used by the database.
Implementation
@override
Map<String, dynamic> toJson() {
return {
'name': name,
if (dartName != null) 'dartName': dartName,
if (module != null) 'module': module,
'schema': schema,
if (tableSpace != null) 'tableSpace': tableSpace,
'columns': columns.toJson(valueToJson: (v) => v.toJson()),
'foreignKeys': foreignKeys.toJson(valueToJson: (v) => v.toJson()),
'indexes': indexes.toJson(valueToJson: (v) => v.toJson()),
if (managed != null) 'managed': managed,
};
}