FastApi-ISS/schemas.py
2025-09-23 12:42:20 +03:30

18 lines
492 B
Python

from pydantic import BaseModel, Field
from typing import List, Optional
from uuid import UUID
from datetime import datetime
class ScrapeRequest(BaseModel):
username: str
seller_id: UUID
max_count: int = Field(default=5, ge=1, le=50)
class ScrapedPost(BaseModel):
ig_post_id: str
media_type: str # "image", "video", or "carousel"
caption: Optional[str]
thumbnail_url: Optional[str]
local_media: List[str] # ✅ list of S3 URLs only
created_at: datetime