mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: init install + cleanup code
This commit is contained in:
parent
2485285a06
commit
38288e8a57
28 changed files with 310 additions and 583 deletions
31
apps/api/src/db/install.py
Normal file
31
apps/api/src/db/install.py
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
from typing import Optional
|
||||
from sqlalchemy import JSON, Column
|
||||
from sqlmodel import Field, SQLModel
|
||||
|
||||
|
||||
class InstallBase(SQLModel):
|
||||
step: int = Field(default=0)
|
||||
data: dict = Field(default={}, sa_column=Column(JSON))
|
||||
|
||||
|
||||
class Install(InstallBase, table=True):
|
||||
id: Optional[int] = Field(default=None, primary_key=True)
|
||||
install_uuid: str = Field(default=None)
|
||||
creation_date: str = ""
|
||||
update_date: str = ""
|
||||
|
||||
|
||||
class InstallCreate(InstallBase):
|
||||
pass
|
||||
|
||||
|
||||
class InstallUpdate(InstallBase):
|
||||
pass
|
||||
|
||||
|
||||
class InstallRead(InstallBase):
|
||||
id: Optional[int] = Field(default=None, primary_key=True)
|
||||
install_uuid: str = Field(default=None)
|
||||
creation_date: str
|
||||
update_date: str
|
||||
pass
|
||||
Loading…
Add table
Add a link
Reference in a new issue