ores.dq.badge_definition
Table of Contents
The badge catalogue. Each entry defines the complete visual presentation of a badge: display label, tooltip, background colour, text colour, severity level, and an optional Bootstrap CSS class hint for browser rendering.
Badge definitions are the single source of truth for all badge visual metadata across UI clients. They are loaded at client startup as reference data and looked up at render time via BadgeCache.
1. Flags
2. Columns
2.1. code
Unique badge definition code.
Examples: 'active', 'locked', 'fsm_draft', 'login_online'.
std::string(faker::word::noun())
2.2. name
Display label shown inside the badge.
std::string(faker::word::adjective())
2.3. description
Tooltip text explaining what this badge represents.
std::string(faker::lorem::sentence())
2.4. background_colour
Badge background colour as a hex string.
Example: '#22c55e'.
std::string("#") + faker::number::hexadecimal(6, faker::HexCasing::Lower, faker::HexPrefix::None)
2.5. text_colour
Badge text colour as a hex string.
Default is '#ffffff' (white). May vary for light-background badges.
std::string("#ffffff")
2.6. severity_code
Severity classification for this badge.
Soft FK to ores_dq_badge_severities_tbl. Bootstrap-aligned codes: secondary, info, success, warning, danger, primary.
std::string("secondary")
2.7. css_class
Optional Bootstrap CSS class hint for browser rendering.
Example: 'badge bg-success'. Nullable — a renderer falls back to inline style from background_colour/text_colour when absent.
std::string{}
2.8. display_order
Order for UI display purposes.
faker::number::integer(1, 100)
3. SQL
3.1. Flags
4. C++
4.1. Flags
4.2. Repository
4.3. Domain includes
#include <chrono> #include <optional> #include <string>
4.4. Entity includes
#include <optional> #include <string> #include "sqlgen/Timestamp.hpp"
4.5. Conventions
4.6. Table display
| column | header |
|---|---|
| code | Code |
| name | Name |
| background_colour | Background |
| text_colour | Text |
| severity_code | Severity |
| display_order | Order |
| modified_by | Modified By |
| version | Version |
4.7. Presentation
4.7.1. Detail fields
| field | label | widget | type | is_key | is_required | placeholder | flag_source | combo_domain_type | combo_fetch_include | combo_fetch_fn | combo_watcher_name | combo_code_field | combo_tooltip_field | combo_sort_field | combo_label | combo_setter_pascal | badge_key |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| code | Code | codeEdit | line_edit | true | true | Badge code | |||||||||||
| name | Name | nameEdit | line_edit | true | Enter name | ||||||||||||
| description | Description | descriptionEdit | text_edit | true | Enter description | ||||||||||||
| background_colour | Background | backgroundColourButton | colour | true | |||||||||||||
| text_colour | Text | textColourButton | colour | true | |||||||||||||
| severity_code | Severity | severityCodeCombo | dynamic_combo | true | dq::domain::badge_severity | fetch_badge_severities | severityCodeWatcher | code | description | display_order | badge severities | SeverityCodeCombo | |||||
| display_order | Order | displayOrderEdit | spin_box | true |
4.7.2. Columns
| enum_name | field | header | type | width | self_colour |
|---|---|---|---|---|---|
| Code | code | Code | string | 150 | |
| Name | name | Name | string | 150 | |
| Description | description | Description | string | 250 | |
| BackgroundColour | background_colour | Background | string | 100 | true |
| TextColour | text_colour | Text | string | 80 | true |
| SeverityCode | severity_code | Severity | string | 100 | |
| DisplayOrder | display_order | Order | int | 80 | |
| Version | version | Version | int | 80 | |
| ModifiedBy | modified_by | Modified By | string | 120 | |
| RecordedAt | recorded_at | Recorded At | timestamp | 150 |
4.7.3. Related entity shortcuts
| signal | icon | label | tooltip |
|---|---|---|---|
| BadgeSeverities | Tag | Severities | Open Badge Severities list |
| BadgeMappings | Tag | Mappings | Open Badge Mappings list |
4.8. Custom repository methods
5. See also
- ores.dq — component group overview.