HierarchyItem Model
Overview
The hierarchyitem table stores individual elements (or nodes) that belong to a specific hierarchy (defined in the hierarchy table). These items represent components like screens, modules, categories, or UI tiles organized in a structured, often nested, format — allowing support for expandable/collapsible menus, role-based visibility, or structured workflows.
Fields
| Field | Type | Description | Required |
|---|---|---|---|
| id | string | Unique identifier for the hierarchy item.Serves as the primary key. | ❌ |
| hierarchyId | string | Identifier to group multiple hierarchy items under the same parent structure | ✅ |
| icon | object | Icon associated with this hierarchy item. | ✅ |
| name | string | name field | ✅ |
| description | string | description field | ✅ |
| expanded | boolean | Indicates if this node is expanded by default in tree views (1 = expanded, 0 = collapsed). | ❌ |
| isDeleted | boolean | Boolean flag indicating whether the item is deleted. Soft-delete flag. If set, the item is logically deleted but still present in the DB. | ❌ |
| parent | string | Reference to the parent item.. Used to build the hierarchy (i.e., tree structure). | ❌ |
| default | boolean | Flag indicating if this is a default hierarchy item | ❌ |
| children | array | References to child items under this hierarchy item. May serve as a cache to speed up tree rendering. | ❌ |
| tags | array | Metadata tags associated with the hierarchy item. Useful for filtering or categorization. | ❌ |
| assignedHierarchyIds | array | It stores the hierarchy item id of other hierarchy child nodes | ❌ |
| assignedContentPackages | array | Content packages assigned to this hierarchy item. Useful in LMS, CMS, or product module structures. | ❌ |
| settings | object | Configuration settings for this item. | ❌ |
| created_at | date | Timestamp when the item was created. | ❌ |
| modified_at | date | Timestamp when the item was last updated. | ❌ |
Sample JSON
{
"id": "example_value",
"hierarchyId": "example_value",
"icon": "example_value",
"name": "example_value",
"description": "example_value",
"expanded": "example_value",
"isDeleted": "example_value",
"parent": "example_value",
"default": "example_value",
"children": "example_value",
"tags": "example_value",
"assignedHierarchyIds": "example_value",
"assignedContentPackages": "example_value",
"settings": "example_value",
"created_at": "example_value",
"modified_at": "example_value"
}