feat: 添加公司AI管理平台基础架构

添加了完整的FastAPI后端项目结构,包括:
- 环境配置文件(.env.example)和项目说明文档(README.md、AGENTS.md)
- Dockerfile用于容器化部署
- 核心基础设施:配置管理、数据库连接、调度器、安全认证
- 模块化设计:AI代理、审批流程、审计日志、业务台账等功能模块
- 支持多数据库连接(主库和遗留系统只读库)
- AI适配器支持OpenClaw、Hermes、OpenAI兼容接口
- 飞书集成、报表生成、风险监控等企业级功能
- 完整的依赖管理和测试指南
```
This commit is contained in:
2026-06-21 21:57:28 +08:00
commit 71ca804764
68 changed files with 3662 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
from typing import Any
from pydantic import BaseModel, Field
class FeishuTextMessage(BaseModel):
receive_id: str | None = Field(
default=None,
description="chat_id or open_id depending on type.",
)
receive_id_type: str = "chat_id"
text: str
class FeishuCardMessage(BaseModel):
receive_id: str | None = None
receive_id_type: str = "chat_id"
card: dict[str, Any]
class FeishuWebhookEvent(BaseModel):
type: str | None = None
challenge: str | None = None
token: str | None = None
schema_: str | None = Field(default=None, alias="schema")
header: dict[str, Any] | None = None
event: dict[str, Any] | None = None
class FeishuSendResult(BaseModel):
ok: bool
provider_response: dict[str, Any]
class FeishuCommandRequest(BaseModel):
text: str
chat_id: str | None = None
actor: str = "api"
auto_reply: bool = False
class FeishuCommandResult(BaseModel):
command: str
reply_type: str
title: str
content: str
provider_response: dict[str, Any] | None = None