feat(projects): product hierarchy - family, product, component #78

Merged
sharang merged 1 commits from feat/product-hierarchy into main 2026-10-15 20:36:21 +00:00
1 Commits
Author SHA1 Message Date
Sharang ParnerkarandClaude Opus 5.5 c4b7686cc5 feat(projects): product hierarchy - family, product, component
ci / shared (pull_request) Successful in 14s
ci / test (pull_request) Successful in 25m43s
ci / image (pull_request) Skipped
A product project gets a level (family | product | component) and a
parent (migration 0020), so a machine with its robot arm, PLC, edge
server and Windows app, or a product family, can be modelled. Topics stay
flat; kind is unchanged and old clients get level "product" at the top.
The API checks the tree: allowed parents per level, same tenant, no
cycles, at most 4 levels, children still fitting after a level change.
The database keeps parents within the tenant and refuses to delete a
project with children (409 has_children). The list stays flat with
level and parent_id. A document's role follows the level of the project
it is linked to; no document schema change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 22:10:15 +02:00