<?php

namespace App\Http\Requests\Admin;

use Illuminate\Foundation\Http\FormRequest;

class EstacionImportOmitidaUpdateRequest extends FormRequest
{
    /**
     * La autorización se resuelve por middleware admin + root user.
     */
    public function authorize(): bool
    {
        return true;
    }

    /**
     * Permite editar cualquier dato operativo necesario para resolver la fila.
     */
    public function rules(): array
    {
        return [
            'direccion' => ['nullable', 'string', 'max:255'],
            'coordenadas' => ['nullable', 'string', 'max:100'],
            'ciudad' => ['nullable', 'string', 'max:150'],
            'departamento' => ['nullable', 'string', 'max:150'],
            'resolved_ciudad_id' => ['nullable', 'integer', 'exists:ciudades,id'],
            'status' => ['nullable', 'in:pendiente,resuelto,descartado'],
        ];
    }
}
