"""Request and response schemas for the Category domain."""
from __future__ import annotations

from datetime import datetime

from repo_core.base.schemas import BaseResponseSchema


class CategoryResponse(BaseResponseSchema):
    """Serialised category returned to API callers."""

    id: int
    title: str
    name: str
    parent_id: int | None = None
    created_at: datetime | None = None
    updated_at: datetime | None = None


class CategoryListResponse(BaseResponseSchema):
    """Paginated list of categories."""

    items: list[CategoryResponse]
    total: int
