<?php

declare(strict_types=1);

namespace App\Domain\Jobs;

/**
 * A periodic batch unit of work. Implementations declare scheduling
 * metadata and a single `run()` method; `JobRunner` wraps invocation with
 * lock acquisition, run-history bookkeeping, and exception capture.
 *
 * Concrete jobs live under `App\Application\Jobs\…` (recompute-scores,
 * cleanup-audit, enrich-pending) plus the `tick` dispatcher.
 */
interface Job
{
    public function name(): string;

    public function defaultIntervalSeconds(): int;

    public function maxRuntimeSeconds(): int;

    public function run(JobContext $context): JobResult;
}
