<?php

namespace App\Policies;

use App\Models\Recall;
use App\Models\User;

class RecallPolicy
{
    public function viewAny(User $user): bool
    {
        return $user->can('recalls.view');
    }

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

    public function update(User $user, Recall $recall): bool
    {
        return $user->can('recalls.manage') && $recall->tenant_id === $user->tenant_id;
    }
}
