Add project model, routes and logic. WIP
This commit is contained in:
parent
7a62ff58a3
commit
bbe0df9546
4 changed files with 76 additions and 1 deletions
19
app/models/project.py
Normal file
19
app/models/project.py
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
from sqlmodel import SQLModel, Field
|
||||
|
||||
class Project(SQLModel, table=True):
|
||||
|
||||
id: int | None = Field(
|
||||
default=None,
|
||||
primary_key=True
|
||||
)
|
||||
|
||||
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