deerflow-code/offline-backend-20260512/backend/app/report_collaboration/contracts/requirements.py
2026-09-07 18:24:55 +08:00

26 lines
820 B
Python

"""Requirement snapshot. A scope-changing user reply must bump ``revision``."""
from __future__ import annotations
from pydantic import BaseModel, ConfigDict, Field
class ReportRequirementSnapshot(BaseModel):
model_config = ConfigDict(extra="forbid")
topic: str
objective: str | None = None
audience: str | None = None
language: str | None = None
time_range: str | None = None
geography: str | None = None
required_angles: list[str] = Field(default_factory=list)
excluded_angles: list[str] = Field(default_factory=list)
source_constraints: str | None = None
report_structure_id: str | None = None
length_target: str | None = None
tone: str | None = None
deadline_hint: str | None = None
quality_priority: str | None = None
revision: int = Field(ge=1)