# Auto-generated by DjangoCFG - see CLAUDE.md

from __future__ import annotations

from typing import Any

from pydantic import BaseModel, ConfigDict, Field

from ..enums import ScheduleEventEventType


class ScheduleEvent(BaseModel):
    """
    Serializer for schedule events.

    Response model (includes read-only fields).
    """

    model_config = ConfigDict(
        validate_assignment=True,
        extra="allow",
        frozen=False,
    )

    id: Any = ...
    schedule: Any = ...
    schedule_name: Any = ...
    run: Any | None = Field(None, description='Related run if applicable')
    event_type: ScheduleEventEventType = Field(description='* `created` - Schedule created *...')
    message: Any = Field(description='Event description')
    message_preview: Any = ...
    context: dict[str, Any] = Field(description='Additional context data')
    source: Any = Field(description='Where event originated: server, ...')
    timestamp: Any = ...



class PaginatedScheduleEventList(BaseModel):
    """
    
    Response model (includes read-only fields).
    """

    model_config = ConfigDict(
        validate_assignment=True,
        extra="allow",
        frozen=False,
    )

    count: int = Field(description='Total number of items across all...')
    page: int = Field(description='Current page number (1-based)')
    pages: int = Field(description='Total number of pages')
    page_size: int = Field(description='Number of items per page')
    has_next: bool = Field(description='Whether there is a next page')
    has_previous: bool = Field(description='Whether there is a previous page')
    next_page: int | None = Field(None, description='Next page number (null if no nex...')
    previous_page: int | None = Field(None, description='Previous page number (null if no...')
    results: list[ScheduleEvent] = Field(description='Array of items for current page')



