modify structure
This commit is contained in:
9
server/src/app/models/knowledge.py
Normal file
9
server/src/app/models/knowledge.py
Normal file
@@ -0,0 +1,9 @@
|
||||
from sqlmodel import Field, SQLModel, Relationship
|
||||
#TODO : add pydantic validation
|
||||
|
||||
class Knowledge(SQLModel, table=True):
|
||||
id: int | None = Field(default=None, primary_key=True)
|
||||
content: str = Field(index=True)
|
||||
uri: str = Field(index=True)
|
||||
|
||||
questions: list["Question"] = Relationship(back_populates="knowledge", cascade_delete=True) # type: ignore
|
||||
Reference in New Issue
Block a user