feat(api): serve the category content field on GET /_journal/api/v1/categories

- add the nullable TEXT column golem15_journal_categories.content (migration 202610090001)
- map it as models.Category.Content and emit category content on every categories row
- document the categories row shape and the stored-as-is HTML semantics
This commit is contained in:
2026-10-09 16:24:20 +02:00
parent 57a347c97b
commit 740dcd086d
7 changed files with 317 additions and 2 deletions

View File

@@ -9,6 +9,7 @@ type Category struct {
Slug string `gorm:"column:slug"`
Code *string `gorm:"column:code"`
Description *string `gorm:"column:description"`
Content *string `gorm:"column:content"` // HTML body (D-21): stored and served as is, not translatable
ParentID *uint `gorm:"column:parent_id"`
NestLeft *int `gorm:"column:nest_left"`
NestRight *int `gorm:"column:nest_right"`