<?php

namespace App\Policies;

use App\Models\Contractor;
use App\Models\User;

class ContractorPolicy
{
    public function viewAny(User $user): bool
    {
        return $user->can('view_contractors');
    }

    public function view(User $user, Contractor $contractor): bool
    {
        return $user->can('view_contractors');
    }

    public function create(User $user): bool
    {
        return $user->can('create_contractors');
    }

    public function update(User $user, Contractor $contractor): bool
    {
        return $user->can('update_contractors');
    }

    public function delete(User $user, Contractor $contractor): bool
    {
        return $user->can('delete_contractors');
    }

    public function deleteAny(User $user): bool
    {
        return $user->can('delete_contractors');
    }
}
