toJson method
Converts the object to a JSON representation.
Returns the JSON representation of the object.
Implementation
@override
Map<String, dynamic> toJson() => {
if (modelName != null) 'modelName': modelName!,
'action': action.name,
'query': query,
};