Fixed formatting and type definitions
This commit is contained in:
parent
bbe0df9546
commit
d97335e0c7
5 changed files with 112 additions and 65 deletions
|
|
@ -1,19 +1,11 @@
|
|||
from sqlmodel import SQLModel, Field
|
||||
from sqlmodel import Field, SQLModel
|
||||
|
||||
|
||||
class Project(SQLModel, table=True):
|
||||
id: int | None = Field(default=None, primary_key=True)
|
||||
|
||||
id: int | None = Field(
|
||||
default=None,
|
||||
primary_key=True
|
||||
)
|
||||
|
||||
parent_id: int | None = Field(
|
||||
default=None,
|
||||
foreign_key="project.id"
|
||||
)
|
||||
parent_id: int | None = Field(default=None, foreign_key="project.id")
|
||||
|
||||
title: str
|
||||
|
||||
content: str | None = Field(default=None)
|
||||
|
||||
|
||||
Loading…
Reference in a new issue