25 lines
619 B
Python
25 lines
619 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 MediaItem(BaseModel):
|
|
media_type: str # image | video
|
|
media_url: str # original Instagram URL
|
|
local_media: str # full S3/MinIO URL
|
|
|
|
|
|
class ScrapedPost(BaseModel):
|
|
ig_post_id: str
|
|
media_type: str # image | video | carousel
|
|
caption: Optional[str]
|
|
thumbnail_url: Optional[str]
|
|
local_media: List[MediaItem]
|
|
created_at: datetime |