34 lines
606 B
Python
34 lines
606 B
Python
from pydantic import BaseModel, ConfigDict
|
|
|
|
|
|
class VideoCreate(BaseModel):
|
|
title: str
|
|
youtuber: str
|
|
thumbnailUrl: str
|
|
youtubeUrl: str
|
|
profileId: int | None = None
|
|
|
|
|
|
class VideoResponse(BaseModel):
|
|
id: int
|
|
title: str
|
|
youtuber: str
|
|
thumbnailUrl: str
|
|
youtubeUrl: str
|
|
isDownloaded: bool
|
|
profileIds: list[int]
|
|
|
|
model_config = ConfigDict(from_attributes=True)
|
|
|
|
|
|
class CleanupRequest(BaseModel):
|
|
profileId: int
|
|
excludeIds: list[int] = []
|
|
|
|
|
|
class ProfileResponse(BaseModel):
|
|
id: int
|
|
name: str
|
|
|
|
model_config = ConfigDict(from_attributes=True)
|