refactor: move tenant apply db to service

This commit is contained in:
2025-12-25 11:27:14 +08:00
parent c010710b32
commit 1a357177fd
3 changed files with 64 additions and 30 deletions

View File

@@ -16,6 +16,7 @@
- **Backend rule of law**: all backend development MUST follow `backend/llm.txt` (HTTP/module layout, generated-file rules, GORM-Gen usage, transactions, comments, and route conventions).
- Go: run `gofmt` on changed files; keep HTTP handlers thin (bind → `services.*` → return).
- Backend layering: controllers must not call `models.*`, `models.Q.*`, or raw `*gorm.DB` CRUD directly; all DAO/DB operations must live in `backend/app/services/*` (controller only does bind/validate → `services.*` → return).
- HTTP module directories are `snake_case`; path params are `camelCase` and prefer typed IDs like `:orderID<int>` to avoid route conflicts.
- Avoid editing generated files (e.g. `backend/app/http/**/routes.gen.go`, `backend/docs/docs.go`); regenerate via `atomctl` instead.