Add machines with day-by-day work lists for job tasks
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Modules\Machines\Application\Contracts;
|
||||
|
||||
use App\Modules\Machines\Application\DTOs\DayLoad;
|
||||
use App\Modules\Machines\Application\DTOs\MachineSummary;
|
||||
use App\Modules\Machines\Application\DTOs\QueueRow;
|
||||
|
||||
interface MachineQueries
|
||||
{
|
||||
/**
|
||||
* @return list<MachineSummary> By name.
|
||||
*/
|
||||
public function machines(bool $includeInactive = false): array;
|
||||
|
||||
public function findMachine(int $id): ?MachineSummary;
|
||||
|
||||
/**
|
||||
* Active machines serving any of the service units.
|
||||
*
|
||||
* @param list<int> $serviceUnitIds
|
||||
* @return list<MachineSummary>
|
||||
*/
|
||||
public function machinesFor(array $serviceUnitIds): array;
|
||||
|
||||
/**
|
||||
* The task's open row on a machine's work list, without task details.
|
||||
*/
|
||||
public function rowForTask(int $taskId): ?QueueRow;
|
||||
|
||||
/**
|
||||
* A machine's work list for the day: quick sale orders first, then on
|
||||
* today's list the late rows of earlier days, then the day's rows in
|
||||
* order. Rows on days after today are listed for viewing only.
|
||||
*
|
||||
* @return list<QueueRow>
|
||||
*/
|
||||
public function rowsOn(int $machineId, string $day, string $today): array;
|
||||
|
||||
/**
|
||||
* The machine's planned rows and estimated hours on the days.
|
||||
*
|
||||
* @return list<DayLoad>
|
||||
*/
|
||||
public function load(int $machineId, string $from, int $days): array;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<?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;
|
||||
}
|
||||
Reference in New Issue
Block a user