docs: 为 category-api 和 apikey-article-api 添加项目笔记文件

- 添加 category-api 的 problems、decisions、learnings、issues 文档
- 添加 apikey-article-api 的 issues、decisions、learnings 文档
- 包含架构决策、问题记录和学习总结
This commit is contained in:
augushong
2026-04-28 21:03:15 +08:00
parent bb08dee91d
commit 0e8944bc7f
13 changed files with 1830 additions and 1 deletions

View File

@@ -0,0 +1,8 @@
# Learnings
## 2026-04-28 Plan Analysis
- Category 模型没有 SoftDelete trait必须手动过滤 `where('delete_time', 0)`
- `getListLevel()` 不过滤 status有静态缓存问题 → 树形模式不直接使用
- `array2level()` 使用 `static $list` 累积机制,需注意调用方式
- `type` 字段在数据库中是 string 类型,不是 int
- API 控制器多数模式:`$this->request` 取参,无 `declare(strict_types=1)`