$lines */ public function __construct( public int $id, public int $pickupNumber, public string $orderedOn, public string $orderedAt, public string $sellerName, public ?int $customerId, public ?string $customerName, public OrderStatus $status, public ?int $saleId, public int $totalCents, public array $lines, ) {} public function isPaid(): bool { return $this->saleId !== null; } /** * Whether making has not started on any line, so the order can still be * cancelled without anything recorded. */ public function isOpen(): bool { return $this->status === OrderStatus::InProduction || $this->status === OrderStatus::Ready; } }