feat: update le docs logic

This commit is contained in:
2026-06-09 20:14:27 +03:00
parent 14df805209
commit cc75f61e76
23 changed files with 420 additions and 262 deletions

View File

@@ -2,7 +2,7 @@ from __future__ import annotations
from src.application.domain.entities.organization import (
LegalEntityEntity,
OrganizationDocumentEntity,
OrganizationDocumentSlot,
OrganizationWalletEntity,
PurchaseRequestEntity,
)
@@ -78,19 +78,17 @@ def secret_key_to_response(
def document_to_response(
entity: OrganizationDocumentEntity,
entity: OrganizationDocumentSlot,
*,
download_url: str | None = None,
) -> DocumentResponse:
return DocumentResponse(
id=entity.id,
organization_id=entity.organization_id,
document_type=entity.document_type,
s3_key=entity.s3_key,
file_name=entity.file_name,
content_type=entity.content_type,
file_size_bytes=entity.file_size_bytes,
uploaded_by=entity.uploaded_by,
created_at=entity.created_at.isoformat() if entity.created_at else None,
download_url=download_url,
)