$stepMachineIds * @param list $currentMaterials */ public function __construct( public int $id, public int $orderId, public int $pickupNumber, public ?string $customerName, public string $orderedAt, public string $productName, public int $quantity, public int $totalCents, public array $stepMachineIds, public ?int $currentStep, public array $currentMaterials, public bool $isMade, ) {} public function hasProduction(): bool { return $this->stepMachineIds !== []; } public function currentMachineId(): ?int { return $this->currentStep === null ? null : $this->stepMachineIds[$this->currentStep]; } }