toJson method
Implementation
@override
Object toJson() => {
if (document case final document?) 'document': document.toJson(),
if (targetIds.isNotDefault) 'targetIds': targetIds,
if (removedTargetIds.isNotDefault) 'removedTargetIds': removedTargetIds,
};