2026-03-05 08:26:51 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace MintyPHP\Repository\Audit;
|
|
|
|
|
|
2026-03-13 21:58:51 +01:00
|
|
|
/** Contract for tracking user deactivation/deletion lifecycle events and restore eligibility. */
|
2026-03-05 08:26:51 +01:00
|
|
|
interface UserLifecycleAuditRepositoryInterface
|
|
|
|
|
{
|
|
|
|
|
public function create(array $row): int|false;
|
|
|
|
|
|
|
|
|
|
public function updateStatus(int $id, string $status, ?string $reasonCode = null): bool;
|
|
|
|
|
|
|
|
|
|
public function listPaged(array $filters): array;
|
|
|
|
|
|
|
|
|
|
public function listFilterOptions(int $limit = 200): array;
|
|
|
|
|
|
|
|
|
|
public function find(int $id): ?array;
|
|
|
|
|
|
|
|
|
|
public function findDeleteEventForRestore(int $id, bool $forUpdate = false): ?array;
|
|
|
|
|
|
|
|
|
|
public function markRestored(int $id, int $restoredBy, int $restoredUserId): bool;
|
|
|
|
|
|
|
|
|
|
public function purgeOlderThanDays(int $days): int;
|
|
|
|
|
}
|