diff --git a/src/DTO/SyncConfirmation.php b/src/DTO/SyncConfirmation.php new file mode 100644 index 0000000..87b8606 --- /dev/null +++ b/src/DTO/SyncConfirmation.php @@ -0,0 +1,13 @@ + $this->itemsUpdated, + 'additions' => $this->additions, + 'deletions' => $this->deletions, + 'modifications' => $this->modifications, + ]; + } +} diff --git a/src/DTO/SyncPreviewResult.php b/src/DTO/SyncPreviewResult.php new file mode 100644 index 0000000..62bd20e --- /dev/null +++ b/src/DTO/SyncPreviewResult.php @@ -0,0 +1,38 @@ +additions) > 0 + || array_sum($this->deletions) > 0 + || array_sum($this->modifications) > 0; + } + + public function jsonSerialize(): array + { + return [ + 'modelTypeId' => $this->modelTypeId, + 'category' => $this->category, + 'itemCount' => $this->itemCount, + 'additions' => $this->additions, + 'deletions' => $this->deletions, + 'modifications' => $this->modifications, + ]; + } +} diff --git a/src/Service/Sync/SyncStrategyInterface.php b/src/Service/Sync/SyncStrategyInterface.php new file mode 100644 index 0000000..18f6ae6 --- /dev/null +++ b/src/Service/Sync/SyncStrategyInterface.php @@ -0,0 +1,27 @@ +