from pydantic import BaseModel, Field


class CurrentUser(BaseModel):
    """Validated JWT payload. Returned by get_current_user dependency."""
    sub: str
    email: str
    premium: bool = False
    plan: str = ""
    premiumExpiry: str = Field("", alias="premiumExpiry")

    model_config = {"populate_by_name": True}


class GoogleAuthRequest(BaseModel):
    idToken: str = Field(..., min_length=1)


class GoogleAuthResponse(BaseModel):
    token: str
    userId: str
    email: str
    name: str
    photoUrl: str
    onboarded: bool
    language: str
    isPremium: bool
    plan: str
    expiryDate: str
