<?php

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

use App\Classes\General\Abstracts\AbstractRule;
use App\Classes\Modules\Milestones\DataTransferObjects\MilestoneObject;
use Illuminate\Support\Facades\Auth;

class CanDeleteMilestone extends AbstractRule
{
    /**
     * @return bool
     */
    protected function authorized(): bool
    {
        if (!Auth::user()->can('delete milestone')) {
            return false;
        }

        return true;

    }

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

    }


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

}
