- Add single-line class docblocks to all 59 repository classes and interfaces describing scope and responsibility - Add multi-line docblocks to key services documenting business rules: AuthService (6-step login cascade), ImportService (3-phase CSV workflow), TenantScopeService (strict/permissive modes), PermissionService (RBAC resolution + two-tier caching), UserAccountService (atomicity + audit) - Add transaction(callable) wrapper to DatabaseSessionRepository to DRY up begin/commit/rollback boilerplate Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
32 lines
829 B
PHP
32 lines
829 B
PHP
<?php
|
|
|
|
namespace MintyPHP\Repository\Scheduler;
|
|
|
|
/** Contract for scheduled job CRUD, due-job queries, and run status tracking. */
|
|
interface ScheduledJobRepositoryInterface
|
|
{
|
|
public function create(array $data): int|false;
|
|
|
|
public function find(int $id): ?array;
|
|
|
|
public function findByKey(string $jobKey): ?array;
|
|
|
|
public function listPaged(array $filters): array;
|
|
|
|
public function listDueJobs(string $nowUtc, int $limit = 20): array;
|
|
|
|
public function updateJobMeta(int $id, array $data): bool;
|
|
|
|
public function markRunning(int $id, string $startedAtUtc): bool;
|
|
|
|
public function finishRun(
|
|
int $id,
|
|
string $status,
|
|
string $startedAtUtc,
|
|
string $finishedAtUtc,
|
|
?string $nextRunAtUtc,
|
|
?string $errorCode,
|
|
?string $errorMessage
|
|
): bool;
|
|
}
|