298 lines
11 KiB
Markdown
298 lines
11 KiB
Markdown
# User Editable Fields Overview
|
|
|
|
This document provides a comprehensive overview of all fields that users can edit across all Pydantic models in the PowerOn system, excluding protected system fields (id and fields starting with _).
|
|
|
|
## Protected System Fields (Not Editable by Users)
|
|
|
|
The following field types are automatically protected and cannot be modified by users:
|
|
- **ID Fields**: All `id` fields (primary keys)
|
|
- **System Fields**: All fields starting with `_` (underscore)
|
|
- **Read-Only Fields**: Fields marked with `frontend_readonly=True`
|
|
|
|
## interfaceAppModel.py
|
|
|
|
### Mandate
|
|
**Table**: `Mandate`
|
|
**Editable Fields**:
|
|
- `name` (text, required) - Name of the mandate
|
|
- `language` (select, required) - Default language (de, en, fr, it)
|
|
- `enabled` (checkbox, optional) - Whether mandate is enabled
|
|
|
|
**Protected Fields**: `id`
|
|
|
|
### UserConnection
|
|
**Table**: `UserConnection`
|
|
**Editable Fields**:
|
|
- `externalUsername` (text, optional) - Username in external system
|
|
- `externalEmail` (email, optional) - Email in external system
|
|
- `status` (select, optional) - Connection status (active, inactive, expired, pending)
|
|
|
|
**Protected Fields**: `id`, `userId`, `authority`, `externalId`, `connectedAt`, `lastChecked`, `expiresAt`, `tokenStatus`, `tokenExpiresAt`
|
|
|
|
### User
|
|
**Table**: `User`
|
|
**Editable Fields**:
|
|
- `username` (text, required) - Username for login
|
|
- `email` (email, required) - Email address
|
|
- `fullName` (text, optional) - Full name
|
|
- `language` (select, required) - Preferred language (de, en, fr, it)
|
|
- `enabled` (checkbox, optional) - Whether user is enabled
|
|
- `privilege` (select, required) - Permission level (user, admin, sysadmin)
|
|
|
|
**Protected Fields**: `id`, `authenticationAuthority`, `mandateId`
|
|
|
|
### UserInDB
|
|
**Table**: `UserInDB` (extends User)
|
|
**Editable Fields**: Same as User
|
|
**Additional Protected Fields**: `hashedPassword`
|
|
|
|
### Token
|
|
**Table**: `Token`
|
|
**Editable Fields**: None (all fields are system-managed)
|
|
|
|
**Protected Fields**: `id`, `userId`, `authority`, `connectionId`, `tokenAccess`, `tokenType`, `expiresAt`, `tokenRefresh`, `createdAt`
|
|
|
|
### AuthEvent
|
|
**Table**: `AuthEvent`
|
|
**Editable Fields**: None (all fields are system-managed)
|
|
|
|
**Protected Fields**: `id`, `userId`, `eventType`, `timestamp`, `ipAddress`, `userAgent`, `success`, `details`
|
|
|
|
### SystemTable
|
|
**Table**: `SystemTable`
|
|
**Editable Fields**: None (all fields are system-managed)
|
|
|
|
**Protected Fields**: `table_name`, `initial_id`
|
|
|
|
## interfaceComponentModel.py
|
|
|
|
### FileItem
|
|
**Table**: `FileItem`
|
|
**Editable Fields**:
|
|
- `fileName` (text, required) - Name of the file
|
|
|
|
**Protected Fields**: `id`, `mandateId`, `mimeType`, `fileHash`, `fileSize`, `creationDate`
|
|
|
|
### FilePreview
|
|
**Table**: `FilePreview` (transient model)
|
|
**Editable Fields**: None (all fields are computed/display-only)
|
|
|
|
**Protected Fields**: `content`, `mimeType`, `fileName`, `isText`, `encoding`, `size`
|
|
|
|
### FileData
|
|
**Table**: `FileData`
|
|
**Editable Fields**: None (all fields are system-managed)
|
|
|
|
**Protected Fields**: `id`, `data`, `base64Encoded`
|
|
|
|
### Prompt
|
|
**Table**: `Prompt`
|
|
**Editable Fields**:
|
|
- `content` (textarea, required) - Content of the prompt
|
|
- `name` (text, required) - Name of the prompt
|
|
|
|
**Protected Fields**: `id`, `mandateId`
|
|
|
|
## interfaceChatModel.py
|
|
|
|
### ActionDocument
|
|
**Table**: `ActionDocument` (transient model)
|
|
**Editable Fields**: None (all fields are system-generated)
|
|
|
|
**Protected Fields**: `documentName`, `documentData`, `mimeType`
|
|
|
|
### ActionResult
|
|
**Table**: `ActionResult` (transient model)
|
|
**Editable Fields**: None (all fields are system-generated)
|
|
|
|
**Protected Fields**: `success`, `error`, `documents`, `resultLabel`
|
|
|
|
### UserInputRequest
|
|
**Table**: `UserInputRequest` (transient model)
|
|
**Editable Fields**:
|
|
- `prompt` (text, required) - Prompt for the user
|
|
- `listFileId` (list, optional) - List of file IDs
|
|
- `userLanguage` (text, optional) - User's preferred language
|
|
|
|
**Protected Fields**: None
|
|
|
|
### ContentMetadata
|
|
**Table**: `ContentMetadata` (transient model)
|
|
**Editable Fields**: None (all fields are system-computed)
|
|
|
|
**Protected Fields**: `size`, `pages`, `error`, `width`, `height`, `colorMode`, `fps`, `durationSec`, `mimeType`, `base64Encoded`
|
|
|
|
### ContentItem
|
|
**Table**: `ContentItem` (transient model)
|
|
**Editable Fields**: None (all fields are system-generated)
|
|
|
|
**Protected Fields**: `label`, `data`, `metadata`
|
|
|
|
### ChatDocument
|
|
**Table**: `ChatDocument`
|
|
**Editable Fields**: None (all fields are system-managed)
|
|
|
|
**Protected Fields**: `id`, `messageId`, `fileId`, `fileName`, `fileSize`, `mimeType`, `roundNumber`, `taskNumber`, `actionNumber`, `actionId`
|
|
|
|
### DocumentExchange
|
|
**Table**: `DocumentExchange` (transient model)
|
|
**Editable Fields**: None (all fields are system-generated)
|
|
|
|
**Protected Fields**: `documentsLabel`, `documents`
|
|
|
|
### ExtractedContent
|
|
**Table**: `ExtractedContent` (transient model)
|
|
**Editable Fields**: None (all fields are system-generated)
|
|
|
|
**Protected Fields**: `id`, `contents`
|
|
|
|
### TaskAction
|
|
**Table**: `TaskAction`
|
|
**Editable Fields**:
|
|
- `execParameters` (dict, optional) - Action parameters
|
|
- `userMessage` (text, optional) - User-friendly message
|
|
|
|
**Protected Fields**: `id`, `execMethod`, `execAction`, `execResultLabel`, `expectedDocumentFormats`, `status`, `error`, `retryCount`, `retryMax`, `processingTime`, `timestamp`, `result`, `resultDocuments`
|
|
|
|
### TaskResult
|
|
**Table**: `TaskResult` (transient model)
|
|
**Editable Fields**: None (all fields are system-generated)
|
|
|
|
**Protected Fields**: `taskId`, `status`, `success`, `feedback`, `error`
|
|
|
|
### TaskItem
|
|
**Table**: `TaskItem`
|
|
**Editable Fields**:
|
|
- `userInput` (text, required) - User input that triggered the task
|
|
- `rollbackOnFailure` (boolean, optional) - Whether to rollback on failure
|
|
- `dependencies` (list, optional) - List of task IDs this task depends on
|
|
- `feedback` (text, optional) - Task feedback message
|
|
|
|
**Protected Fields**: `id`, `workflowId`, `status`, `error`, `startedAt`, `finishedAt`, `actionList`, `retryCount`, `retryMax`, `processingTime`, `resultLabels`
|
|
|
|
### ChatStat
|
|
**Table**: `ChatStat`
|
|
**Editable Fields**: None (all fields are system-computed)
|
|
|
|
**Protected Fields**: `id`, `workflowId`, `messageId`, `processingTime`, `tokenCount`, `bytesSent`, `bytesReceived`, `successRate`, `errorCount`
|
|
|
|
### ChatLog
|
|
**Table**: `ChatLog`
|
|
**Editable Fields**: None (all fields are system-generated)
|
|
|
|
**Protected Fields**: `id`, `workflowId`, `message`, `type`, `timestamp`, `status`, `progress`, `performance`
|
|
|
|
### ChatMessage
|
|
**Table**: `ChatMessage`
|
|
**Editable Fields**:
|
|
- `message` (text, optional) - Message content
|
|
- `role` (text, required) - Role of the message sender
|
|
- `status` (text, required) - Status of the message (first, step, last)
|
|
- `success` (boolean, optional) - Whether message processing was successful
|
|
|
|
**Protected Fields**: `id`, `workflowId`, `parentMessageId`, `documents`, `documentsLabel`, `sequenceNr`, `publishedAt`, `stats`, `actionId`, `actionMethod`, `actionName`, `roundNumber`, `taskNumber`, `actionNumber`, `taskProgress`, `actionProgress`
|
|
|
|
### ChatWorkflow
|
|
**Table**: `ChatWorkflow`
|
|
**Editable Fields**:
|
|
- `status` (select, optional) - Current status (running, completed, stopped, error)
|
|
- `name` (text, required) - Name of the workflow
|
|
|
|
**Protected Fields**: `id`, `mandateId`, `currentRound`, `currentTask`, `currentAction`, `totalTasks`, `totalActions`, `lastActivity`, `startedAt`, `logs`, `messages`, `stats`, `tasks`
|
|
|
|
### TaskStep
|
|
**Table**: `TaskStep` (transient model)
|
|
**Editable Fields**:
|
|
- `objective` (text, required) - Task objective
|
|
- `dependencies` (list, optional) - List of dependencies
|
|
- `success_criteria` (list, optional) - List of success criteria
|
|
- `estimated_complexity` (text, optional) - Estimated complexity
|
|
- `userMessage` (text, optional) - User-friendly message
|
|
|
|
**Protected Fields**: `id`
|
|
|
|
### TaskHandover
|
|
**Table**: `TaskHandover` (transient model)
|
|
**Editable Fields**: None (all fields are system-generated)
|
|
|
|
**Protected Fields**: `taskId`, `sourceTask`, `inputDocuments`, `outputDocuments`, `context`, `previousResults`, `improvements`, `workflowSummary`, `messageHistory`, `timestamp`, `handoverType`
|
|
|
|
### TaskContext
|
|
**Table**: `TaskContext` (transient model)
|
|
**Editable Fields**: None (all fields are system-managed)
|
|
|
|
**Protected Fields**: All fields are system-managed
|
|
|
|
### ReviewContext
|
|
**Table**: `ReviewContext` (transient model)
|
|
**Editable Fields**: None (all fields are system-managed)
|
|
|
|
**Protected Fields**: All fields are system-managed
|
|
|
|
### ReviewResult
|
|
**Table**: `ReviewResult` (transient model)
|
|
**Editable Fields**:
|
|
- `userMessage` (text, optional) - User-friendly message
|
|
|
|
**Protected Fields**: `status`, `reason`, `improvements`, `quality_score`, `missing_outputs`, `met_criteria`, `unmet_criteria`, `confidence`
|
|
|
|
### TaskPlan
|
|
**Table**: `TaskPlan` (transient model)
|
|
**Editable Fields**:
|
|
- `overview` (text, required) - Plan overview
|
|
- `userMessage` (text, optional) - User-friendly message
|
|
|
|
**Protected Fields**: `tasks`
|
|
|
|
### WorkflowResult
|
|
**Table**: `WorkflowResult` (transient model)
|
|
**Editable Fields**: None (all fields are system-computed)
|
|
|
|
**Protected Fields**: `status`, `completed_tasks`, `total_tasks`, `execution_time`, `final_results_count`, `error`, `phase`
|
|
|
|
### AiResult
|
|
**Table**: `AiResult` (transient model)
|
|
**Editable Fields**: None (all fields are system-generated)
|
|
|
|
**Protected Fields**: `filename`, `mimetype`, `content`
|
|
|
|
### CentralizedAiResponse
|
|
**Table**: `CentralizedAiResponse` (transient model)
|
|
**Editable Fields**: None (all fields are system-generated)
|
|
|
|
**Protected Fields**: `aiResults`, `success`, `error`
|
|
|
|
## Summary by Table Type
|
|
|
|
### Fully User-Editable Tables
|
|
- **Mandate**: 3 editable fields
|
|
- **User**: 6 editable fields
|
|
- **FileItem**: 1 editable field
|
|
- **Prompt**: 2 editable fields
|
|
- **ChatMessage**: 4 editable fields
|
|
- **ChatWorkflow**: 2 editable fields
|
|
|
|
### Partially User-Editable Tables
|
|
- **UserConnection**: 3 editable fields (out of 11 total)
|
|
- **TaskAction**: 2 editable fields (out of 13 total)
|
|
- **TaskItem**: 4 editable fields (out of 12 total)
|
|
|
|
### System-Managed Tables (No User Editable Fields)
|
|
- **Token**, **AuthEvent**, **SystemTable**
|
|
- **FilePreview**, **FileData**, **ContentMetadata**, **ContentItem**
|
|
- **ChatDocument**, **DocumentExchange**, **ExtractedContent**
|
|
- **TaskResult**, **ChatStat**, **ChatLog**
|
|
- **TaskHandover**, **TaskContext**, **ReviewContext**
|
|
- **WorkflowResult**, **AiResult**, **CentralizedAiResponse**
|
|
|
|
### Transient/Display-Only Tables
|
|
- **ActionDocument**, **ActionResult**, **UserInputRequest**
|
|
- **TaskStep**, **ReviewResult**, **TaskPlan**
|
|
|
|
## RBAC Implementation Notes
|
|
|
|
When implementing the RBAC system, focus on the **Fully User-Editable Tables** and **Partially User-Editable Tables** as these are where users will need different permission levels for different operations.
|
|
|
|
The **System-Managed Tables** should generally have read-only access for most users, with only system administrators having full access.
|
|
|
|
The **Transient Tables** are typically used for data transfer and don't need persistent storage permissions.
|