29 lines
702 B
PHP
29 lines
702 B
PHP
<?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;
|
|
}
|