"""Pydantic schemas for health responses."""

from datetime import datetime

from pydantic import BaseModel

class ComponentCheck(BaseModel):
    name: str
    # pass | warn | fail
    status: str
    time: datetime | None = None
    output: str | None = None
    observedValue: float | int | None = None
    observedUnit: str | None = None

class HealthStatus(BaseModel):
    # pass | warn | fail
    status: str
    version: str | None = None
    environment: str | None = None
    serviceName: str | None = None
    description: str | None = None
    checks: dict[str, ComponentCheck]
