<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

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

    public function rules(): array
    {
        return [
            'title' => 'required|string|max:255',
            'description' => 'nullable|string',
            'type' => 'required|string|max:50',
            'project_id' => 'nullable|exists:projects,id',
            'priority' => 'nullable|string|max:50',
            'estimated_effort' => 'nullable|numeric',
            'status' => 'nullable|in:active',
        ];
    }
}
