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,20 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Modules\Machines\Domain\Contracts;
|
||||
|
||||
use App\Modules\Machines\Domain\Entities\Machine;
|
||||
|
||||
interface MachineRepository
|
||||
{
|
||||
public function findById(int $id): ?Machine;
|
||||
|
||||
/**
|
||||
* Saves the machine with its service units and counters; counters left
|
||||
* out are removed when nothing refers to them.
|
||||
*/
|
||||
public function save(Machine $machine): Machine;
|
||||
|
||||
public function isNameTaken(string $name, ?int $exceptId = null): bool;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Modules\Machines\Domain\Contracts;
|
||||
|
||||
use App\Modules\Machines\Domain\Entities\QueueEntry;
|
||||
use DateTimeImmutable;
|
||||
|
||||
interface QueueRepository
|
||||
{
|
||||
public function findById(int $id): ?QueueEntry;
|
||||
|
||||
public function openEntryForTask(int $taskId): ?QueueEntry;
|
||||
|
||||
public function openEntryForOrderLine(int $orderLineId): ?QueueEntry;
|
||||
|
||||
/**
|
||||
* The machine's open rows planned on the day, in position order.
|
||||
*
|
||||
* @return list<QueueEntry>
|
||||
*/
|
||||
public function openEntriesOn(int $machineId, DateTimeImmutable $day): array;
|
||||
|
||||
public function save(QueueEntry $entry): QueueEntry;
|
||||
|
||||
public function delete(QueueEntry $entry): void;
|
||||
}
|
||||
Reference in New Issue
Block a user