ores.dq.code_domain
Table of Contents
A code domain is a classification registry that names the context in which a code value exists. It disambiguates identical codes used in different entity types — e.g. 'ACTIVE' in party_status vs 'ACTIVE' in book_status.
Code domains are reusable beyond badges: any future system needing to namespace code values (validation rules, audit customisation, etc.) can reference this table.
Flags
Columns
code
Unique code domain identifier.
Examples: 'party_status', 'book_type', 'fsm_state', 'dq_nature'.
name
Human-readable name for the code domain.
std::string(faker::word::noun()) + " Domain"
description
Detailed description of what this code domain classifies.
std::string(faker::lorem::sentence())
display_order
Order for UI display purposes.
faker::number::integer(1, 100)
SQL
Flags
C++
Flags
Repository
Domain includes
#include <chrono> #include <string>
Entity includes
#include <string> #include "sqlgen/Timestamp.hpp"
Conventions
Table display
| column | header |
|---|---|
| code | Code |
| name | Name |
| description | Description |
| display_order | Order |
| modified_by | Modified By |
| version | Version |
Qt
Columns (Qt model)
| enum_name | field | header | type | width |
|---|---|---|---|---|
| Code | code | Code | string | 150 |
| Name | name | Name | string | 200 |
| Description | description | Description | string | 300 |
| 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 |
Custom repository methods
Custom badge mappings tab
The live CodeDomainDetailDialog (projects/ores.qt/dq) is itself
hand-maintained, not generated from this model. Paste blocks don't apply
here since the live file isn't tangled/generated. Instead, a read-only
"Badge Mappings" tab (showing every entity_code -> badge_definition
mapping registered for the displayed code_domain) is wired directly into
projects/ores.qt/dq/src/CodeDomainDetailDialog.cpp by hand, mirroring
the paste-block pattern used by PartyHierarchyTab in shape (see
BadgeMappingsTab) even though no actual paste block is involved.
See also
- ores.dq — component group overview.