Files
Inventory/src/Service/Sync/SyncStrategyInterface.php
2026-03-13 13:47:59 +01:00

28 lines
741 B
PHP

<?php
declare(strict_types=1);
namespace App\Service\Sync;
use App\DTO\SyncConfirmation;
use App\DTO\SyncExecutionResult;
use App\DTO\SyncPreviewResult;
use App\Entity\ModelType;
interface SyncStrategyInterface
{
public function supports(ModelType $modelType): bool;
/**
* Compute diff between proposed structure and current items' slots.
* Does NOT persist anything.
*/
public function preview(ModelType $modelType, array $newStructure): SyncPreviewResult;
/**
* Apply sync: compare current skeleton requirements (already persisted)
* with items' slots and add/remove as needed.
*/
public function execute(ModelType $modelType, SyncConfirmation $confirmation): SyncExecutionResult;
}