from __future__ import annotations

from pydantic import BaseModel


class ErrorResponse(BaseModel):
    detail: str


class RootStatusRead(BaseModel):
    message: str


class HealthDatabaseStatusRead(BaseModel):
    configured: bool
    ok: bool
    error: str | None = None


class HealthRedisStatusRead(BaseModel):
    configured: bool
    enabled: bool


class HealthCheckRead(BaseModel):
    status: str
    database: HealthDatabaseStatusRead
    redis: HealthRedisStatusRead
