mirror of
https://github.com/jihe520/MathModelAgent.git
synced 2026-10-30 07:24:14 +08:00
- 后端按 Google Python Style Guide 重构注释,修复 ruff 和 pyright 错误(161→0) - 前端按 Vue.js Style Guide 重构注释,修复 biome 错误 - 添加 PostToolUse lint hook(ruff + biome 自动检查) - 更新 CLAUDE.md 覆盖 Commands/Testing/Structure/CodeStyle/GitWorkflow/Boundaries - 修复 tsconfig.json 废弃的 baseUrl 配置
25 lines
650 B
Python
25 lines
650 B
Python
"""请求数据模型定义。"""
|
|
|
|
from pydantic import BaseModel
|
|
from app.schemas.enums import CompTemplate, FormatOutPut
|
|
|
|
|
|
class ExampleRequest(BaseModel):
|
|
"""示例建模请求。"""
|
|
example_id: str
|
|
source: str
|
|
|
|
|
|
class Problem(BaseModel):
|
|
"""建模问题描述。"""
|
|
task_id: str
|
|
ques_all: str = ""
|
|
comp_template: CompTemplate = CompTemplate.CHINA
|
|
format_output: FormatOutPut = FormatOutPut.Markdown
|
|
|
|
def model_dump(self, **kwargs):
|
|
data = super().model_dump(**kwargs)
|
|
data["comp_template"] = self.comp_template.value
|
|
data["format_output"] = self.format_output.value
|
|
return data
|