Files
Toiminnanohjaus/app/Modules/Machines/Domain/Contracts/MachineRepository.php
2026-11-26 16:43:55 +02:00

21 lines
490 B
PHP

<?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;
}