22 lines
551 B
PHP
22 lines
551 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Modules\Machines\Domain\ValueObjects;
|
|
|
|
use App\Modules\Machines\Domain\Enums\MaintenanceLevel;
|
|
|
|
/**
|
|
* How a maintenance item stands now: its level (the worse of its counter
|
|
* and time intervals), the counter amount left (in thousandths, negative
|
|
* when past) and the day the time interval is due (Y-m-d).
|
|
*/
|
|
final readonly class MaintenanceState
|
|
{
|
|
public function __construct(
|
|
public MaintenanceLevel $level,
|
|
public ?int $remainingMilli,
|
|
public ?string $dueOn,
|
|
) {}
|
|
}
|