"""
Pydantic schemas for influencer prediction endpoints
"""

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


class InfluencerPredictionRequest(BaseModel):
    """Request model for influencer prediction"""

    model_config = {
        "json_schema_extra": {
            "example": {
                "biography": "Fashion blogger | Daily outfits | NYC 🗽",
                "recent_captions": "New summer collection! Love these colors. #ootd #fashion",
                "recent_hashtags": "#fashion #style #ootd #nyc #blogger",
                "followers": 45000,
                "following": 890,
                "posts_count": 523,
                "verified": False,
                "avg_likes": 1800.5,
                "avg_comments": 45.2,
                "avg_video_views": 5000.0,
                "engagement_rate": 4.2
            }
        }
    }

    # Text features
    biography: str = Field(..., description="Influencer biography")
    recent_captions: str = Field(..., description="Concatenated recent post captions")
    recent_hashtags: str = Field(..., description="Concatenated recent hashtags")

    # Numeric features
    followers: int = Field(..., ge=0, description="Follower count")
    following: int = Field(..., ge=0, description="Following count")
    posts_count: int = Field(..., ge=0, description="Total posts count")
    verified: bool = Field(..., description="Verification status")
    avg_likes: float = Field(..., ge=0, description="Average likes per post")
    avg_comments: float = Field(..., ge=0, description="Average comments per post")
    avg_video_views: float = Field(..., ge=0, description="Average video views")
    engagement_rate: float = Field(..., ge=0, description="Engagement rate percentage")


# Response model moved to common.py as PredictionResponse (unified for both influencer and business)

