Correction on core models and schemas

This commit is contained in:
2025-05-13 16:24:20 +02:00
parent 9aac1d3e34
commit 77fa4cde35
3 changed files with 9 additions and 6 deletions

View File

@@ -1,7 +1,7 @@
from typing import Any
from typing import Any, Optional
from beanie import PydanticObjectId
from pydantic import Field
from pydantic import Field, BaseModel
from firm.core.models import CrudDocument, CrudDocumentConfig
from firm.core.schemas import Writer, Reader
@@ -32,7 +32,8 @@ class CurrentFirm(CrudDocument):
return cls.model_validate(document)
class CurrentFirmSchemaRead(Reader):
class CurrentFirmSchemaRead(BaseModel):
id: Optional[PydanticObjectId]
entity: EntityRead
partner: EntityRead
partner_list: list[EntityRead]