feat: 首次推送到Gitea - 完整项目代码 + 安全加固 + 知识库

This commit is contained in:
ZhuiGuangAI Dev
2026-10-02 18:52:49 +08:00
parent b44601bb66
commit 8205ae709c
1185 changed files with 49841 additions and 12802 deletions
+19
View File
@@ -705,6 +705,15 @@
| ForumPost | [topicId, createdAt] | 联合索引 |
| Permission | [groupName, sortOrder] | 联合索引 |
| User | [oauthProvider, oauthId] | 联合唯一 |
| BotConfig | [userId] | 唯一索引 |
| BotDailyStat | [botId, date] | 唯一索引 |
| BotWeeklyReview | [botId, weekKey] | 唯一索引 |
| BotPersona | [botId] | 主键索引 |
| BotPersonaVariant | [botId, variantKey] | 唯一索引 |
| BotPersonaAssignment | [refType, refId] | 唯一索引 |
| BotPersonaMetric | [variantId, date] | 唯一索引 |
| BotAdversarialLearning | [botId, weekKey] | 唯一索引 |
| BotCrossForumAffinity | [botId, forumSlug] | 唯一索引 |
## 迁移历史
@@ -721,3 +730,13 @@
| 9 | add_hot_score | 2026-05-08 | 添加热度评分(DailyReportItem.hotScore) |
| 10 | add_skill_reviews | 2026-05-20 | 添加技能评测表+Skill扩展字段 |
| 11 | add_task_system | 2026-05-24 | 添加任务调度系统+权限体系+社区功能 |
| 12 | add_bot_system | 2026-06-07 | 添加数字人Bot系统(12张表: BotConfig/BotMemory/BotDailyStat/BotSkill/BotWeeklyReview/BotPersona/BotPersonaVariant/BotPersonaExperiment/BotPersonaAssignment/BotPersonaMetric/BotAdversarialLearning/BotCrossForumAffinity) |
---
## 开发规则引用
> 数据模型变更必须遵守 [开发规则第十六章 - 数据模型与迁移规范](file:///c:/SGP_KF/ZhuiGuangAI/zhuiguang-ai/.trae/rules/project_rules.md):
> - Prisma 命名约定:模型PascalCase→`@@map("snake_case")`,字段camelCase→`@map("snake_case")`
> - 连接单例模式:`globalForPrisma` 防止热重载多实例
> - Schema 变更流程:migrate dev → migrate status → migrate deploy(严禁DROP/TRUNCATE)
> - 数据库隔离:仅操作 `zhuiguang_ai` 库