update llm.txt

This commit is contained in:
2025-12-18 11:00:03 +08:00
parent 8fa05444df
commit 368726f60c

View File

@@ -162,9 +162,9 @@ type UserStatus string
- For every enum `type` defined under `backend/pkg/consts/`, you MUST also define:
- `Description() string`: return the Chinese label for the specific enum value (used by API/FE display).
- `Items() []requests.KV`: return the KV list for FE dropdowns (typically `Key=enum string`, `Value=Description()`). Prefer defining it as a type method like `func (UserStatus) Items() []requests.KV`.
- `XxxItems() []requests.KV`: return the KV list for FE dropdowns (typically `Key=enum string`, `Value=Description()`). Example: `func TenantStatusItems() []requests.KV` and call it via `consts.TenantStatusItems()`.
- Prefer `string(t)` as `Key`, and use a stable default label for unknown values (e.g. `未知` / `未知状态`).
- MUST: these two methods MUST be placed immediately below the enum `type` definition (same file, directly under `type Xxx string`), to keep the enum self-contained and easy to review.
- MUST: `Description()` and `XxxItems()` MUST be placed immediately below the enum `type` definition (same file, directly under `type Xxx string`), to keep the enum self-contained and easy to review.
- Generate enum code: `atomctl gen enum`