feat: add search
This commit is contained in:
@@ -4,6 +4,7 @@ from src.application.domain.entities.organization import (
|
||||
LegalEntityEntity,
|
||||
OrganizationDocumentSlot,
|
||||
OrganizationWalletEntity,
|
||||
PartySearchEntity,
|
||||
PurchaseRequestEntity,
|
||||
)
|
||||
from src.presentation.schemas.organization import (
|
||||
@@ -11,6 +12,7 @@ from src.presentation.schemas.organization import (
|
||||
DocumentResponse,
|
||||
MnemonicResponse,
|
||||
OrganizationResponse,
|
||||
PartySearchResponse,
|
||||
PurchaseRequestResponse,
|
||||
SecretKeyResponse,
|
||||
WalletResponse,
|
||||
@@ -41,6 +43,21 @@ def organization_to_response(entity: LegalEntityEntity) -> OrganizationResponse:
|
||||
)
|
||||
|
||||
|
||||
def party_search_to_response(entity: PartySearchEntity) -> PartySearchResponse:
|
||||
return PartySearchResponse(
|
||||
id=entity.id,
|
||||
account_type=entity.account_type,
|
||||
user_id=entity.user_id,
|
||||
email=entity.email,
|
||||
name=entity.name,
|
||||
inn=entity.inn,
|
||||
phone=entity.phone,
|
||||
status=entity.status,
|
||||
kyc_verified=entity.kyc_verified,
|
||||
created_at=entity.created_at.isoformat() if entity.created_at else None,
|
||||
)
|
||||
|
||||
|
||||
def wallet_to_response(entity: OrganizationWalletEntity) -> WalletResponse:
|
||||
return WalletResponse(
|
||||
id=entity.id,
|
||||
|
||||
Reference in New Issue
Block a user