Added data download ability

This commit is contained in:
2023-02-19 21:10:00 +00:00
parent 48f080de7c
commit c850726f91
64 changed files with 12734 additions and 2 deletions

View File

@@ -0,0 +1,25 @@
from pydantic import BaseModel
from sqlmodel import Field, Relationship, SQLModel
from src.exceptions.base_exception import BaseException
from src.models.SQLModelExtended import SQLModelExtended
class SignVideo(SQLModelExtended, table=True):
id: int = Field(primary_key=True)
approved: bool = False
# foreign key to sign
sign_id: int = Field(default=None, foreign_key="sign.id")
sign: "Sign" = Relationship(
back_populates="sign_videos",
sa_relationship_kwargs={"lazy": "selectin"},
)
# path where video saved
path: str
class SignVideoOut(BaseModel):
id: int
approved: bool