# -*- coding: utf-8 -*-
"""管理端 — 数据库健康监控 Pydantic Schema。

需求: 6.1, 6.2
"""

from __future__ import annotations

from typing import Literal

from pydantic import BaseModel


class DbHealthItem(BaseModel):
    """单个数据库健康状态"""
    db_name: str
    status: Literal['connected', 'disconnected']
    active_connections: int | None = None
    idle_connections: int | None = None
    db_size_mb: float | None = None
    slow_query_count: int | None = None
