"""Pydantic models for the named-dashboards API."""

from __future__ import annotations

from typing import Any

from pydantic import BaseModel, Field


class NamedDashboardInput(BaseModel):
    """Input for create/update of a named dashboard."""

    id: str | None = None
    label: str = Field(default="Dashboard")
    slug: str | None = None
    sort_order: int = 0
    payload: dict[str, Any] = Field(default_factory=dict)


class NamedDashboard(BaseModel):
    """A named dashboard record."""

    id: str
    label: str
    slug: str
    sort_order: int
    payload: dict[str, Any]
    created_at: int
    updated_at: int
