<?php

namespace App\Classes\Modules\Bookings\Standards\Rules;

use App\Classes\General\Abstracts\AbstractRule;
use App\Classes\Modules\Bookings\DataTransferObjects\BookingObject;
use Illuminate\Support\Facades\Auth;

class CanDeleteBooking extends AbstractRule
{
    /**
     * @return bool
     */
    protected function authorized($object): bool
    {
        // TODO  Set Authorization rules

        if (!Auth::user()->can('delete booking')) {
            return false;
        }

        return true;

    }

    /**
     * @param BookingObject $object
     * @return bool
     */
    protected function validators($object): bool
    {
        return true;

    }


    /**
     * @param $object
     * @return bool
     */
    protected function criteria($object): bool
    {
        return true;
    }

}