<?php

namespace App\Domains\Cart\Requests;

use Illuminate\Foundation\Http\FormRequest;

class UpdateCartItemQuantityRequest extends FormRequest
{
    public function authorize(): bool
    {
        return true;
    }

    /**
     * @return array<string, mixed>
     */
    public function rules(): array
    {
        return [
            'cantidad' => ['required', 'integer', 'min:1'],
            'catalog_item_id' => ['prohibited'],
            'variant_id' => ['sometimes', 'nullable', 'integer'],
        ];
    }
}
