<?php

namespace App\Http\Controllers\Api\V1\Filters\Requests;

use Illuminate\Foundation\Http\FormRequest;

class FilterIndexRequest extends FormRequest
{
    /**
     * Get the validation rules that apply to the request.
     *
     * @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
     */
    public function rules(): array
    {
        return [
            'collection_id' => ['bail', 'nullable', 'int', 'exists:collections,id'],
            'category_id' => ['bail', 'nullable', 'int', 'exists:categories,id'],
            'brand_id' => ['bail', 'nullable', 'int', 'exists:brands,id'],
        ];
    }
}
