<?php

namespace App\Policies;

use App\Models\Company;
use App\Models\User;

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

    public function view(User $user, Company $company): bool
    {
        return $user->can('view_companies');
    }

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

    public function update(User $user, Company $company): bool
    {
        return $user->can('update_companies');
    }

    public function delete(User $user, Company $company): bool
    {
        return $user->can('delete_companies');
    }

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