"""
Auth 모듈 Pydantic 스키마
"""

from datetime import datetime

from pydantic import BaseModel


class UserResponse(BaseModel):
    """사용자 정보 응답"""

    id: int
    kakao_id: str
    nickname: str | None
    email: str | None
    profile_image: str | None
    created_at: datetime
    last_login_at: datetime

    model_config = {"from_attributes": True}


class TokenResponse(BaseModel):
    """토큰 응답"""

    access_token: str
    token_type: str = "bearer"
    user: UserResponse


class AuthStatusResponse(BaseModel):
    """인증 상태 응답 (프론트엔드용)"""

    is_authenticated: bool
    user: UserResponse | None = None
