Files
metabuilder/dbal/shared/api/schema/entities/codeforge/componentNode.json
johndoe6345789 c33787912c fix(dbal): add tenantId auto-add to loadFromDirectory, fix ComponentNode schema
loadFromDirectory() was missing the tenantId field auto-add logic that
loadFromFile() already had, causing "Unknown field: tenantId" on all
entities using the shorthand `"tenantId": true` convention.

Also corrected ComponentNode schema to match the C++ struct fields
(pageId, parentId, childIds, order) instead of the wrong Redux shape.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 09:20:28 +00:00

71 lines
1.5 KiB
JSON

{
"entity": "ComponentNode",
"version": "1.0",
"description": "Visual component node in a page tree with parent-child hierarchy and ordering",
"tenantId": true,
"fields": {
"id": {
"type": "uuid",
"primary": true,
"generated": true,
"description": "Unique component node identifier"
},
"pageId": {
"type": "string",
"required": true,
"description": "Page this component belongs to"
},
"parentId": {
"type": "string",
"optional": true,
"nullable": true,
"description": "Parent component ID (null for root components)"
},
"type": {
"type": "string",
"required": true,
"min_length": 1,
"max_length": 100,
"description": "Component type name"
},
"childIds": {
"type": "string",
"required": true,
"description": "Serialized list of child component IDs"
},
"order": {
"type": "integer",
"required": true,
"default": 0,
"description": "Display order within parent scope (non-negative)"
}
},
"indexes": [
{
"fields": ["tenantId"]
},
{
"fields": ["pageId"]
},
{
"fields": ["parentId"]
},
{
"fields": ["pageId", "parentId", "order"]
}
],
"relations": {
"page": {
"type": "belongs-to",
"entity": "UiPage",
"foreign_key": "pageId"
}
},
"acl": {
"create": { "user": true },
"read": { "self": true, "admin": true },
"update": { "self": true },
"delete": { "self": true }
}
}