<?php

namespace App\Http\Requests\TaskProjectTasks;

use Illuminate\Foundation\Http\FormRequest;

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

    public function rules(): array
    {
        return [
            'task_project_id' => ['required', 'integer'],
            'title' => ['required', 'string', 'max:255'],
            'due_date' => ['required', 'date_format:Y-m-d'],
            'status' => ['sometimes', 'required', 'string', 'in:pending,completed,canceled'],
            'completed_at' => ['nullable', 'date'],
            'notes' => ['nullable', 'string', 'max:2000'],
        ];
    }
}
