"""Authentication Pydantic models."""

from __future__ import annotations

from datetime import datetime

from pydantic import BaseModel


class GitHubUser(BaseModel):
    id: int
    login: str
    avatar_url: str = ""
    name: str = ""
    email: str = ""


class AuthMeResponse(BaseModel):
    user: GitHubUser
    session_expires_at: datetime
    token_expires_at: datetime | None


class AuthStatusResponse(BaseModel):
    authenticated: bool
    auth_methods: list[str]
    user: GitHubUser | None = None


class GitHubRepo(BaseModel):
    name: str
    full_name: str
    html_url: str
    description: str = ""
    private: bool = False
    default_branch: str = "main"
