Added data download ability
This commit is contained in:
25
backend/src/models/signvideo.py
Normal file
25
backend/src/models/signvideo.py
Normal 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
|
||||
Reference in New Issue
Block a user