refactor: shorten model and table prefixes

This commit is contained in:
2026-07-23 14:30:17 +08:00
parent 6e7be2f3a4
commit 0ca2898ac0
71 changed files with 707 additions and 638 deletions

View File

@@ -11,7 +11,7 @@
## Global Constraints
- 外部 API 前缀为 `/api/v1`,字段为 camelCase对外 ID 为 UUIDv7 identity。
- 数据库模型和表名前缀规则保持 `SenlinAgent` / `senlin_agent_`
- 数据库模型和表名前缀规则保持 `Sa` / `sa_`
- session token 必须签名并过期handler 只从认证 middleware 读取用户。
- 文件路径必须由文件服务构造;标签必须限定在项目内。
- AI 请求必须限流并记录 provider、key 类型、action、status 和 error。
@@ -121,7 +121,7 @@ type ProjectDTO struct {
Description string `json:"description"`
}
func projectDTO(project models.SenlinAgentProject) ProjectDTO {
func projectDTO(project models.SaProject) ProjectDTO {
return ProjectDTO{ID: project.Identity, Name: project.Name, Identifier: project.Identifier, Icon: project.Icon, Background: project.Background, Description: project.Description}
}
```