from typing import Optional
from datetime import datetime
from pydantic import BaseModel, Field

class Image(BaseModel):
    id: Optional[str] = Field(None, alias="_id")
    pin_id: Optional[str] = None
    image_hash: str
    metadata: dict = {
        "created_at": datetime.now().isoformat(),
        "original_filename": "",
        "mime_type": "",
        "size": 0
    }
    caption: Optional[str] = None 