This commit is contained in:
Marek
2026-04-05 20:43:35 +02:00
parent f8de245e45
commit f269271c6e
16 changed files with 237 additions and 32 deletions

View File

@@ -6,6 +6,7 @@ class VideoCreate(BaseModel):
youtuber: str
thumbnail_url: str
youtube_url: str
profile_id: int | None = None
class VideoResponse(BaseModel):
@@ -15,6 +16,7 @@ class VideoResponse(BaseModel):
thumbnail_url: str
youtube_url: str
is_downloaded: bool
profile_ids: list[int]
class Config:
from_attributes = True
@@ -28,4 +30,13 @@ class VideoResponse(BaseModel):
thumbnail_url=video.thumbnail_url,
youtube_url=video.youtube_url,
is_downloaded=video.file_path is not None,
profile_ids=[p.id for p in video.profiles],
)
class ProfileResponse(BaseModel):
id: int
name: str
class Config:
from_attributes = True