diff --git a/packages/v1/administrativo/services/client/client_index_service.py b/packages/v1/administrativo/services/client/client_index_service.py index b69f791..d62d7a4 100644 --- a/packages/v1/administrativo/services/client/client_index_service.py +++ b/packages/v1/administrativo/services/client/client_index_service.py @@ -9,9 +9,9 @@ class IndexService: os clientes, delegando a busca para a Action correspondente. """ - # O método execute pode ser adaptado para receber 'first' e 'skip' se a Action/Repository suportar paginação. - # No entanto, mantendo o padrão da assinatura do arquivo de referência, ele não recebe parâmetros aqui. - def execute(self): + # O método execute agora recebe 'first' e 'skip' + def execute(self, first: int, skip: int) -> Tuple[List[Dict[str, Any]], int]: + """ Executa o serviço de listagem de clientes. @@ -21,6 +21,9 @@ class IndexService: # Instânciamento de ação index_action = IndexAction() + # Executa a busca de todos os logs com paginação + data, total_records = index_action.execute(first, skip) + # Executa a busca de todos os clientes (a Action/Repository fará a busca, potencialmente com paginação) data = index_action.execute() @@ -33,4 +36,4 @@ class IndexService: ) # Retorna as informações localizadas - return data \ No newline at end of file + return data, total_records \ No newline at end of file