25 lines
581 B
PHP
25 lines
581 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Modules\Machines\Application\DTOs;
|
|
|
|
/**
|
|
* A machine's details as entered. Counters without an id are new.
|
|
*/
|
|
final readonly class MachineData
|
|
{
|
|
/**
|
|
* @param list<int> $serviceUnitIds
|
|
* @param list<array{id: ?int, name: string, unit: string}> $counters
|
|
*/
|
|
public function __construct(
|
|
public string $name,
|
|
public string $type,
|
|
public ?string $description,
|
|
public array $serviceUnitIds,
|
|
public ?int $responsibleUserId,
|
|
public array $counters = [],
|
|
) {}
|
|
}
|