feat(api): catalog places - parks, gates, park categories, category types, categories (#16) #80
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
primatekuntech/kws!80
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/catalog-parks"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #16.
What
Catalog places: parks, gates, park categories (tags), category types and categories.
deleted_at/deleted_by; a removed park takes its gates and frees its name). Names and codes are unique case-insensitively, coordinates range-checked, categories nest (no self-parent in the database, deeper cycles refused by the store under an advisory lock).internal/catalog): public cacheable reads (/v1/parks,/v1/parks/{id}with gates,/v1/parks/{id}/gates,/v1/park-categories,/v1/category-types,/v1/categories), no cost centre and active rows only. Admin CRUD under/v1/admin/...needsadmin_portal.administration.manage; updates sendversion(409 when stale), deletes send?version=; a park update replaces its tags in the same transaction.internal/rest(create/update/delete handlers, strict bodies, cacheable responses, error mapping) andinternal/rest/pgrest(list, optimistic update, constraint mapping). Lookups now uses them too.Storeonly for wiring. This was a gap in my first version (fat 14 and 17 method interfaces) and is fixed here.Verification
make lint0 issues,make cover93.7% total (catalog 100%, catalog store 94.4%, rest 92.7%, pgrest 94.1%), govulncheck clean, down migration round-trips.Known limits (documented in code)
internal/restI moved the code first and wrote its tests afterwards; lookups' existing tests guarded that move.Not in this PR
Media, products, park-products and prices (#17/#18), settings and forms (#19).
🤖 Generated with Claude Code