Roles Model
Overview
The roles table defines access control roles within an application or organization. Each role can be assigned to users and is associated with specific permissions, bundles, or organizational contexts. This table is a cornerstone of the system's RBAC (Role-Based Access Control) framework.
Fields
| Field | Type | Description | Required |
|---|---|---|---|
| id | string | A unique identifier for the role. | ❌ |
| name | string | The name assigned to the role. | ✅ |
| bundle_id | any | Refers to a bundle that this role is part of. Could be a group of features, permissions, or modules. | ❌ |
| override | any | May contain JSON or logic/rules that override default permissions or inheritance behavior. | ❌ |
| ref_id | any | A reference identifier for tracking purposes. Possibly used for cloning or versioning. | ❌ |
| license_role | any | Defines the role's licensing permissions(siteAdmin/Admin/Editor/Viewer/Guest). Helps enforce licensing tiers or restrictions | ❌ |
| application_id | string | The identifier of the application associated with the role. Useful in multi-app environments. | ❌ |
| description | string | A brief description of the role. Useful for admin UIs. | ❌ |
| applicationitem_id | string | Refers to a specific component/module/feature of the application tied to this role. | ❌ |
| predefined_bundle_id | any | References a system-defined or default role bundle, useful for provisioning out-of-the-box roles. | ❌ |
| status | boolean | Indicates whether the role is active (1) or inactive (0). Could be used to soft-disable roles. | ✅ |
| permissions | any | Stores the permissions assigned to the role. | ❌ |
| created_at | date | The date and time when the role was created. | ❌ |
| modified_at | date | The date and time when the role was last modified. Useful for audit trails and versioning. | ❌ |
| isSystemGenerated | boolean | Flag to indicate if the role was created by the system (1) vs manually (0). | ❌ |
| type | any | Specifies the type or category of the role. | ❌ |
Relationships
- Hasone Unknown
- Belongsto Unknown
- Hasmany Unknown
Sample JSON
{
"id": "example_value",
"name": "example_value",
"bundle_id": "example_value",
"override": "example_value",
"ref_id": "example_value",
"license_role": "example_value",
"application_id": "example_value",
"description": "example_value",
"applicationitem_id": "example_value",
"predefined_bundle_id": "example_value",
"status": "example_value",
"permissions": "example_value",
"created_at": "example_value",
"modified_at": "example_value",
"isSystemGenerated": "example_value",
"type": "example_value"
}