toJsonForProtocol method
Returns a JSON structure of the model, optimized for Protocol communication.
Implementation
@override
Map<String, dynamic> toJsonForProtocol() {
return {
'constraintName': constraintName,
'columns': columns.toJson(),
'referenceTable': referenceTable,
'referenceTableSchema': referenceTableSchema,
'referenceColumns': referenceColumns.toJson(),
if (onUpdate != null) 'onUpdate': onUpdate?.toJson(),
if (onDelete != null) 'onDelete': onDelete?.toJson(),
if (matchType != null) 'matchType': matchType?.toJson(),
};
}