from typing import Literal

from pydantic import BaseModel, Field

GeneratedVideoReviewStatus = Literal["pending_review", "approved", "rejected"]


class UpdateGeneratedVideoReviewRequest(BaseModel):
    review_status: GeneratedVideoReviewStatus


class GeneratedVideoResponse(BaseModel):
    id: str
    project_id: str
    generation_task_id: str
    name: str
    file_url: str
    file_size: int
    duration: float
    thumbnail_url: str | None = None
    width: int
    height: int
    fps: float
    status: str = "completed"
    review_status: str = "pending_review"
    generation_params: dict = Field(default_factory=dict)
    download_url: str | None = None


class GeneratedVideoDownloadUrlResponse(BaseModel):
    video_id: str
    download_url: str


class ListGeneratedVideosResponse(BaseModel):
    items: list[GeneratedVideoResponse]
