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

Internal organizational unit within a party. More...

#include <business_unit.hpp>

Collaboration diagram for business_unit:
Collaboration graph

Public Attributes

int version = 0
 Version number for optimistic locking and change tracking.
 
std::string tenant_id
 Tenant identifier for multi-tenancy isolation.
 
boost::uuids::uuid id
 UUID uniquely identifying this business unit.
 
boost::uuids::uuid party_id
 Top-level legal entity this unit belongs to.
 
std::string unit_name
 Human-readable name for the business unit.
 
std::optional< boost::uuids::uuid > parent_business_unit_id
 Self-referencing parent unit for hierarchy.
 
std::optional< boost::uuids::uuid > unit_type_id
 Classification type for this business unit.
 
std::string unit_code
 Optional internal code or alias.
 
std::string business_centre_code
 Business centre for the unit.
 
std::string status
 Current lifecycle status (Active, Inactive, Closed).
 
std::string modified_by
 Username of the person who last modified this business unit.
 
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

Internal organizational unit within a party.

Represents internal organizational units (e.g., desks, departments, branches). Supports hierarchical structure via self-referencing parent_business_unit_id. Each unit belongs to a top-level legal entity (party).

Member Data Documentation

◆ id

boost::uuids::uuid id

UUID uniquely identifying this business unit.

Surrogate key for the business unit record.

◆ party_id

boost::uuids::uuid party_id

Top-level legal entity this unit belongs to.

References the parent party record.

◆ unit_name

std::string unit_name

Human-readable name for the business unit.

e.g., 'FX Options Desk', 'London Branch'.

◆ parent_business_unit_id

std::optional<boost::uuids::uuid> parent_business_unit_id

Self-referencing parent unit for hierarchy.

NULL indicates a top-level unit.

◆ unit_type_id

std::optional<boost::uuids::uuid> unit_type_id

Classification type for this business unit.

Optional FK to business_unit_type. When set, the level of this unit's type must be strictly greater than its parent's type level (if the parent also has a type set).

◆ unit_code

std::string unit_code

Optional internal code or alias.

Short identifier for the business unit.

◆ business_centre_code

std::string business_centre_code

Business centre for the unit.

References the business centres scheme. May be null for global units.

◆ change_reason_code

std::string change_reason_code

Code identifying the reason for the change.

References change_reasons table (soft FK).