Switching foreign jkey to PydanticObjectId
This commit is contained in:
@@ -2,7 +2,7 @@ from datetime import date, datetime
|
||||
from typing import List, Literal, Optional
|
||||
|
||||
from pydantic import Field, BaseModel
|
||||
from beanie import Indexed
|
||||
from beanie import Indexed, PydanticObjectId
|
||||
|
||||
from firm.core.models import CrudDocument
|
||||
from firm.core.filter import Filter, FilterSchema
|
||||
@@ -39,7 +39,7 @@ class Individual(EntityType):
|
||||
|
||||
class Employee(BaseModel):
|
||||
position: Indexed(str) = Field(title='Poste')
|
||||
entity_id: str = Field(
|
||||
entity_id: PydanticObjectId = Field(
|
||||
foreignKey={
|
||||
"reference": {
|
||||
"resource": "entity",
|
||||
|
||||
Reference in New Issue
Block a user