feat(llm): update

This commit is contained in:
2025-12-29 12:01:08 +08:00
parent b78f1e1c84
commit 0d0aee87b1

View File

@@ -156,6 +156,8 @@ Models live in:
4) Map complex field types (JSON/ARRAY/UUID/…) via transform file:
- `backend/database/.transform.yaml` → `field_type.<table>`
- MUST: For ALL enum fields (even simple `VARCHAR`), you MUST map them to their corresponding Go enum type (defined in `backend/pkg/consts`) in `.transform.yaml`. This ensures strong typing in the generated models and avoids unsafe manual casting (e.g., `string(consts.GenderMale)`).
- MUST: For deterministic JSONB fields (where the structure is known), define a corresponding Go struct in `backend/database/fields/` and map the field to `types.JSONType[fields.StructName]` in `.transform.yaml`.
5) Generate models:
@@ -460,4 +462,4 @@ func (s *XxxTestSuite) Test_Method() {
So(got, ShouldBeNil)
})
}
```
```