from pydantic import BaseModel
from datetime import datetime
from typing import Optional

class VideoBase(BaseModel):
    title: str
    path: str
    duration: Optional[int] = None
    size: Optional[int] = None
    thumbnail_path: Optional[str] = None

class VideoCreate(VideoBase):
    pass

class VideoUpdate(VideoBase):
    title: Optional[str] = None
    path: Optional[str] = None

class VideoInDB(VideoBase):
    id: int
    date_added: datetime
    is_processed: bool
    
    class Config:
        from_attributes = True