<?php

namespace App\Classes\Modules\Bookings\Services;


use App\Models\Booking;

class ChecksIfBookingMarkingExists
{

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


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

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

}