ORE Studio 0.0.4
Loading...
Searching...
No Matches
Public Attributes | List of all members
badge_definition Struct Referencefinal

Visual definition for a badge, including colours, label, and severity. More...

#include <badge_definition.hpp>

Collaboration diagram for badge_definition:
Collaboration graph

Public Attributes

int version = 0
 Version number for optimistic locking and change tracking.
 
utility::uuid::tenant_id tenant_id = utility::uuid::tenant_id::system()
 Tenant identifier for multi-tenancy isolation.
 
std::string code
 Unique badge definition code.
 
std::string name
 Display label shown inside the badge.
 
std::string description
 Tooltip text explaining what this badge represents.
 
std::string background_colour
 Badge background colour as a hex string.
 
std::string text_colour
 Badge text colour as a hex string.
 
std::string severity_code
 Severity classification for this badge.
 
std::string css_class
 Optional Bootstrap CSS class hint for Wt rendering.
 
int display_order
 Order for UI display purposes.
 
std::string modified_by
 Username of the person who last modified this badge definition.
 
std::string performed_by
 Username of the account that performed this action.
 
std::string change_reason_code
 Code identifying the reason for the change.
 
std::string change_commentary
 Free-text commentary explaining the change.
 
std::chrono::system_clock::time_point recorded_at
 Timestamp when this version of the record was recorded.
 

Detailed Description

Visual definition for a badge, including colours, label, and severity.

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 Wt.

Badge definitions are the single source of truth for all badge visual metadata across Qt and Wt. They are loaded at client startup as reference data and looked up at render time via BadgeCache.

Member Data Documentation

◆ code

std::string code

Unique badge definition code.

Examples: 'active', 'locked', 'fsm_draft', 'login_online'.

◆ background_colour

std::string background_colour

Badge background colour as a hex string.

Example: '#22c55e'.

◆ text_colour

std::string text_colour

Badge text colour as a hex string.

Default is '#ffffff' (white). May vary for light-background badges.

◆ severity_code

std::string severity_code

Severity classification for this badge.

Soft FK to ores_dq_badge_severities_tbl. Bootstrap-aligned codes: secondary, info, success, warning, danger, primary.

◆ css_class

std::string css_class

Optional Bootstrap CSS class hint for Wt rendering.

Example: 'badge bg-success'. Qt ignores this field. Nullable — Wt falls back to inline style from background_colour/text_colour when absent.

◆ change_reason_code

std::string change_reason_code

Code identifying the reason for the change.

References change_reasons table (soft FK).