🔀 chore(user.py): add relationship to flows in User model
This commit is contained in:
parent
b5e4df9943
commit
00e5f70fe1
1 changed files with 2 additions and 0 deletions
|
|
@ -8,6 +8,7 @@ from uuid import UUID, uuid4
|
|||
|
||||
if TYPE_CHECKING:
|
||||
from langflow.services.database.models.api_key import ApiKey
|
||||
from langflow.services.database.models.flow import Flow
|
||||
|
||||
|
||||
class User(SQLModelSerializable, table=True):
|
||||
|
|
@ -20,6 +21,7 @@ class User(SQLModelSerializable, table=True):
|
|||
updated_at: datetime = Field(default_factory=datetime.utcnow)
|
||||
last_login_at: Optional[datetime] = Field()
|
||||
api_keys: list["ApiKey"] = Relationship(back_populates="user")
|
||||
flows: list["Flow"] = Relationship(back_populates="user")
|
||||
|
||||
|
||||
class UserCreate(SQLModel):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue