<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

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

    public function rules(): array
    {
        return [
            'caja_id' => ['nullable', 'integer', 'exists:cajas,id'],
            'efectivo_contado' => ['nullable', 'numeric', 'min:0'],
            'notas_cierre' => ['nullable', 'string', 'max:1000'],
            'solo_json' => ['sometimes', 'boolean'],
        ];
    }
}
