feat: add search
This commit is contained in:
@@ -32,7 +32,7 @@ class ILegalEntityRepository(ABC):
|
||||
raise NotImplementedError
|
||||
|
||||
@abstractmethod
|
||||
async def list_all(self, *, limit: int, offset: int) -> list[LegalEntityEntity]:
|
||||
async def list_all(self, *, limit: int, offset: int, search: str | None = None) -> list[LegalEntityEntity]:
|
||||
raise NotImplementedError
|
||||
|
||||
@abstractmethod
|
||||
@@ -57,5 +57,5 @@ class ILegalEntityRepository(ABC):
|
||||
raise NotImplementedError
|
||||
|
||||
@abstractmethod
|
||||
async def count_all(self) -> int:
|
||||
async def count_all(self, *, search: str | None = None) -> int:
|
||||
raise NotImplementedError
|
||||
|
||||
@@ -2,6 +2,7 @@ from abc import ABC, abstractmethod
|
||||
from datetime import datetime
|
||||
|
||||
from src.application.domain.entities import UserEntity
|
||||
from src.application.domain.entities.organization import PartySearchEntity
|
||||
|
||||
|
||||
class IUserRepository(ABC):
|
||||
@@ -25,3 +26,11 @@ class IUserRepository(ABC):
|
||||
@abstractmethod
|
||||
async def exists_by_email(self, email: str) -> bool:
|
||||
raise NotImplementedError
|
||||
|
||||
@abstractmethod
|
||||
async def search_individuals(self, *, query: str, limit: int, offset: int) -> list[PartySearchEntity]:
|
||||
raise NotImplementedError
|
||||
|
||||
@abstractmethod
|
||||
async def count_individuals(self, *, query: str) -> int:
|
||||
raise NotImplementedError
|
||||
|
||||
Reference in New Issue
Block a user