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

Defines a specific reason for record changes. More...

#include <change_reason.hpp>

Collaboration diagram for change_reason:
Collaboration graph

Public Attributes

int version = 0
 Version number for optimistic locking and change tracking.
 
std::string code
 Unique code identifying this reason.
 
std::string description
 Human-readable description of when to use this reason.
 
std::string category_code
 Category code this reason belongs to.
 
bool applies_to_amend = true
 Whether this reason can be used for amend operations.
 
bool applies_to_delete = true
 Whether this reason can be used for delete operations.
 
bool requires_commentary = false
 Whether commentary is mandatory when using this reason.
 
int display_order = 0
 Display order for UI presentation.
 
std::string recorded_by
 Username of the person who last modified this reason.
 
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

Defines a specific reason for record changes.

Change reasons provide a controlled vocabulary for documenting why records are modified. Each reason belongs to a category (e.g., "static_data", "trade") and can be configured to apply to specific operations (amend, delete) and whether commentary is required when using this reason.

Reasons follow a namespaced format: "category.reason_name" Examples:

Note
This type only includes change_commentary (not change_reason_code) because this entity IS a change reason. Self-referential tracking is handled at the database level.

Member Data Documentation

◆ code

std::string code

Unique code identifying this reason.

This is the natural key for the reason. Format is "category.reason". Examples: "system.new", "static_data.front_office_error".

◆ category_code

std::string category_code

Category code this reason belongs to.

References change_reason_categories.code (soft FK).

◆ display_order

int display_order = 0

Display order for UI presentation.

Lower numbers appear first in dropdown lists.