<?php

namespace App\Http\Requests\Blog;

use Illuminate\Foundation\Http\FormRequest;

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

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array<string,
     */
    public function rules(): array
    {
        return [
            'id' => 'nullable|uuid|exists:blogs,blog_id',
            'author_id' => 'nullable|uuid|exists:users,user_id',
            'category_id' => 'nullable|uuid|exists:blog_categories,category_id',
            'title' => 'nullable|string|max:255|exists:blogs,title',
            'page' => 'nullable|integer|min:1',
            'per_page' => 'nullable|integer|min:1',
        ];
    }
}
