<?php

namespace App\Policies;

use App\Models\InventoryMovement;
use App\Models\User;

/**
 * Movimientos de inventario: lectura con inventory.view; escritura solo inventory.manage.
 */
class InventoryMovementPolicy
{
    public function viewAny(User $user): bool
    {
        return $user->can('inventory.view') || $user->can('inventory.manage');
    }

    public function view(User $user, InventoryMovement $movement): bool
    {
        return $this->viewAny($user);
    }

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