From 469d691a7599f7bd15be79ba5fe8383491105888 Mon Sep 17 00:00:00 2001 From: Rogee Date: Wed, 24 Dec 2025 10:56:30 +0800 Subject: [PATCH] update --- backend/llm.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/llm.txt b/backend/llm.txt index fb95da6..a87c55a 100644 --- a/backend/llm.txt +++ b/backend/llm.txt @@ -23,6 +23,7 @@ This file condenses `backend/docs/dev/http_api.md` + `backend/docs/dev/model.md` - DO NOT manually write route declarations (only `atomctl gen route`). - DO keep Swagger annotations consistent with actual Fiber route paths (including `:param`). - MUST: route path parameter placeholders MUST be `camelCase` (e.g. `:tenantCode`), never `snake_case` (e.g. `:tenant_code`). +- MUST: for numeric ID path params (`int/int64` like `tenantID/userID/orderID`), prefer Fiber typed params `:tenantID` to avoid conflicts with static subpaths (e.g. `/orders/statistics`) and reduce ambiguous routing. - MUST: when importing another HTTP module's `dto` package, the import alias MUST be `_dto` (e.g. `tenant_dto`), not `dto` (e.g. `tenantdto`). - MUST: when creating/generating Go `struct` definitions (DTOs/requests/responses/etc.), add detailed per-field comments describing meaning, usage scenario, and validation/usage rules (do not rely on “self-explanatory” names). - MUST: business code comments MUST be written in Chinese (中文注释), to keep review/maintenance consistent across the team.