Files
Signlanguage_Datacollector/backend/src/models/signvideo.py

27 lines
699 B
Python

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
dataset: str = "train" # train, test, val
# 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
dataset: str