24 lines
1.0 KiB
Markdown
24 lines
1.0 KiB
Markdown
# Data Model for Inactive Sessions Purging, Form Data Persistence, and Centralized Snackbars
|
|
|
|
## Entities
|
|
|
|
### Session
|
|
Represents a user's active interaction with the application.
|
|
- `sessionId`: Unique identifier (string)
|
|
- `userId`: Identifier of the associated user (string)
|
|
- `lastActivityTime`: Timestamp of the last user activity (Date/number)
|
|
- `persistedFormInputs`: A map or object storing form data (object, e.g., `{ formId: { fieldId: value, ... }, ... }`)
|
|
|
|
### Form Input
|
|
Represents an individual input field within an unsubmitted form.
|
|
- `formId`: Identifier for the form (string)
|
|
- `fieldId`: Identifier for the input field (string)
|
|
- `value`: The current value of the input field (string or appropriate type)
|
|
|
|
### Snackbar Notification
|
|
A transient, non-intrusive message displayed to the user.
|
|
- `message`: The text content of the notification (string)
|
|
- `type`: The type of notification (e.g., 'success', 'error', 'info') (string)
|
|
- `duration`: How long the notification should be displayed (number, milliseconds)
|
|
- `position`: Fixed to 'top-right' (string)
|