28 lines
660 B
PHP
28 lines
660 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Modules\Machines\Application\Contracts;
|
|
|
|
use App\Modules\Machines\Application\DTOs\MachineTaskInfo;
|
|
|
|
/**
|
|
* Machines' view of job tasks, read from and changed through the Jobs
|
|
* module's application contracts.
|
|
*/
|
|
interface MachineTasks
|
|
{
|
|
public function info(int $taskId): ?MachineTaskInfo;
|
|
|
|
/**
|
|
* @param list<int> $taskIds
|
|
* @return array<int, MachineTaskInfo> By task id.
|
|
*/
|
|
public function infos(array $taskIds): array;
|
|
|
|
/**
|
|
* Changes a task's status ("in_progress", "in_review" or "done").
|
|
*/
|
|
public function changeStatus(int $taskId, string $status): void;
|
|
}
|