from pydantic import BaseModel
from typing import Optional

class SearchRequest(BaseModel):
    url: str

class CreatePlaylistRequest(BaseModel):
    name: str 
    description: str = ""

class UpdatePlaylistRequest(BaseModel):
    name: str = None
    description: str = None

class AddTrackRequest(BaseModel):
    id: str
    title: str
    artist: str
    album: str
    cover_url: str
    duration: int = 0
    url: str = ""
