from typing import Optional

from pydantic import BaseModel

from fastapi import UploadFile, File

# Shared properties
class VideoBase(BaseModel):
    title: Optional[str] = None
    progress_state: Optional[str] = None
    stored_file_name: Optional[str] = None

# Properties to receive on video creation
class VideoCreate(VideoBase):
    title: str
    progress_state: str
    stored_file_name: str

# Properties to receive on video update
class VideoUpdate(VideoBase):
    pass

# Properties shared by models stored in DB
class VideoInDBBase(VideoBase):
    id: int
    title: str
    progress_state: str
    owner_id: int

    class Config:
        orm_mode = True


# Properties to return to client
class Video(VideoInDBBase):
    pass


# Properties properties stored in DB
class VideoInDB(VideoInDBBase):
    pass
