40 lines
1001 B
Python
40 lines
1001 B
Python
"""Session and run records returned by ``GET /sessions/{id}``."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from typing import Any
|
|
|
|
from pydantic import BaseModel, ConfigDict, Field
|
|
|
|
from app.report_collaboration.contracts.enums import ReportRunStatus, ReportSessionStatus
|
|
|
|
|
|
class ReportSession(BaseModel):
|
|
model_config = ConfigDict(extra="forbid")
|
|
|
|
id: str
|
|
title: str
|
|
status: ReportSessionStatus
|
|
requirement_revision: int
|
|
selected_plan_id: str | None = None
|
|
active_run_id: str | None = None
|
|
current_report_version_id: str | None = None
|
|
created_at: str
|
|
updated_at: str
|
|
|
|
|
|
class ReportRun(BaseModel):
|
|
model_config = ConfigDict(extra="forbid")
|
|
|
|
id: str
|
|
session_id: str
|
|
plan_id: str
|
|
status: ReportRunStatus
|
|
cancel_requested: bool = False
|
|
next_event_seq: int = 0
|
|
current_phase: str | None = None
|
|
usage: dict[str, Any] = Field(default_factory=dict)
|
|
budget_exhausted_reason: str | None = None
|
|
created_at: str
|
|
updated_at: str
|