<?php

namespace App\Http\Requests\TaskInstances;

use Illuminate\Foundation\Http\FormRequest;

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

    public function rules(): array
    {
        return [
            'task_template_id' => ['required', 'integer', 'exists:task_templates,id'],
            'due_date' => ['required', 'date'],
            'status' => ['nullable', 'string', 'max:50'],
            'completed_at' => ['nullable', 'date'],
            'notes' => ['nullable', 'string'],
        ];
    }
}
