<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class StoreSeccion3Request extends FormRequest
{
    public function authorize(): bool { return true; }
    public function rules(): array {
        return [
            'nit'        => ['required','string','max:20'],
            'municipio'  => ['required','string','max:10'],
            'anio'       => ['nullable','integer','between:2000,2100'],
            'periodo'    => ['nullable','integer','between:1,12'],
            'creado_por' => ['nullable','string','max:100'],

            'meta_programada' => ['nullable','numeric','min:0'],
            'resultado_ejecutado' => ['nullable','numeric','min:0'],
            'porcentaje_cumplimiento' => ['nullable','numeric','min:0','max:100'],
            'observaciones' => ['nullable','string'],
        ];
    }
}
