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.
1. Flags
2. Columns
2.1. code
Unique code domain identifier.
Examples: 'party_status', 'book_type', 'fsm_state', 'dq_nature'.
2.2. name
Human-readable name for the code domain.
std::string(faker::word::noun()) + " Domain"
2.3. description
Detailed description of what this code domain classifies.
std::string(faker::lorem::sentence())
2.4. 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 <string>
4.4. Entity includes
#include <string> #include "sqlgen/Timestamp.hpp"
4.5. Conventions
4.6. Table display
| column | header |
|---|---|
| code | Code |
| name | Name |
| description | Description |
| display_order | Order |
| modified_by | Modified By |
| version | Version |
4.7. Presentation
4.7.1. Columns
| 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 |
4.8. Custom repository methods
4.9. Custom badge mappings tab
The CodeDomainDetailDialog that carried this tab was hand-maintained,
not generated from this model, and it went with the desktop client. Paste
blocks never applied here, since that file was never tangled. What the tab
did: a read-only "Badge Mappings" view showing every entity_code ->
badge_definition mapping registered for the displayed code_domain, wired
by hand in the shape of a paste block even though none was involved. A
rebuilt screen needs this tab; nothing renders it today.
5. See also
- ores.dq — component group overview.