<?php

namespace App\Http\Requests\TaskProjects;

use Illuminate\Foundation\Http\FormRequest;

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

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