feat: 添加生命周期报告和AI规则管理功能 - 在Dockerfile中添加pillow依赖包用于图像处理 - 实现生命周期报告调度任务,支持日报和周报两种类型 - 新增TASK_RUN_LIFECYCLE任务常量和相关配置选项 - 扩展AI Agent服务以支持用户规则,并在分析时应用规则 - 添加AI用户规则创建、更新和查询接口 - 增加项目生命周期和财务需求分析技能 - 扩展现有模型以支持更完整的业务数据字段 - 实现飞书图片上传功能用于报告展示 ```
38 lines
996 B
Python
38 lines
996 B
Python
from datetime import date
|
|
|
|
from pydantic import BaseModel
|
|
|
|
from app.core.constants import ActorValue
|
|
from app.modules.feishu.constants import FeishuReceiveIdType
|
|
from app.modules.reports.constants import ReportType
|
|
|
|
|
|
class ReportResponse(BaseModel):
|
|
title: str
|
|
content: str
|
|
lines: list[str]
|
|
|
|
|
|
class PushReportRequest(BaseModel):
|
|
receive_id: str | None = None
|
|
receive_id_type: str = FeishuReceiveIdType.CHAT_ID
|
|
actor: str = ActorValue.SYSTEM
|
|
|
|
|
|
class WorkReportGenerateRequest(BaseModel):
|
|
report_type: ReportType = ReportType.DAILY
|
|
reporter: str = ActorValue.SYSTEM
|
|
department: str | None = None
|
|
project_code: str | None = None
|
|
period_start: date | None = None
|
|
period_end: date | None = None
|
|
persist: bool = False
|
|
actor: str = ActorValue.API
|
|
|
|
|
|
class LifecycleRunRequest(BaseModel):
|
|
report_type: ReportType = ReportType.DAILY
|
|
receive_id: str | None = None
|
|
receive_id_type: str = FeishuReceiveIdType.CHAT_ID
|
|
force: bool = False
|