feat: location hierarchy CRUD API #81
Reference in New Issue
Block a user
Delete Branch "%!s()"
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?
Ref:
docs/ROADMAP.md§ Appendix B / 1.6 Location & Inventory APIsDatabase tables exist (
locationstable inmigrations/001_initial.sql) but no repository layer, routes, or handlers are implemented.Database schema (already exists):
Tasks:
internal/db/locations.go— repository with CRUD methods, hierarchy traversalinternal/api/location_handlers.go— HTTP handlersinternal/api/routes.go:GET /api/locations��� list locations (flat or tree)POST /api/locations— create locationGET /api/locations/{path}— get location by pathDELETE /api/locations/{path}— delete location (reject if inventory exists)parent_idfor nested hierarchy anddepthauto-calculationRelated: #56 (broader inventory-location model issue)