refactor: 对齐后端样例工程规范

This commit is contained in:
2026-07-26 18:24:13 +08:00
parent 4382641e19
commit 4f2bb7e88b
66 changed files with 1869 additions and 660 deletions

12
backend/api/README.md Normal file
View File

@@ -0,0 +1,12 @@
# Platform API
严格沿用 `sample/server` 的 BSM-SDK Core 分层和运行方式。运行前设置:
```powershell
$env:BSM_RuntimeMode="dev"
$env:BSM_Prefix="$(Get-Location)/etc"
$env:BSM_JwtSecretKey="仅本地使用的随机密钥"
go run ./cmd/main/main.go
```
`cmd/cli` 提供 `version``migrate`;受保护接口使用 `middleware.JwtAuth(true)`。UUID V7 主键及完整中文注释以 `../migrations` 为准。