Map<String, dynamic> toJson() { return { 'totalerrores': totalErrores, 'errores': errores?.map((e) => e.toJson()).toList(), 'idfactura': idFactura, }; }