<?php

namespace App\Classes\Modules\Orders\Services;


use App\Models\Order;

class ChecksIfOrderNumberExists
{

    /** @var Order */
    private $repository;


    /**
     * ChecksIfBookingMarkingExists constructor.
     * @param Order $repository
     */
    public function __construct(Order $repository)
    {
        $this->repository = $repository;
    }

    public function execute(int $orderNumber): bool {
        return $this->repository->where('reference', $orderNumber)->exists();
    }

}