ores.refdata.business_unit

Table of Contents

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

Flags

Primary key

UUID uniquely identifying this business unit.

Surrogate key for the business unit record.

Natural keys

party_id

Top-level legal entity this unit belongs to.

References the parent party record.

uuid_gen()

unit_name

Human-readable name for the business unit.

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

std::string(faker::company::name()) + " Desk"

Columns

parent_business_unit_id

Self-referencing parent unit for hierarchy.

NULL indicates a top-level unit.

boost::uuids::uuid()

unit_code

Optional internal code or alias.

Short identifier for the business unit.

std::string("DESK01")

business_centre_code

Business centre for the unit.

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

std::string("GBLO")

SQL

Flags

C++

Flags

Repository

Domain includes

#include <chrono>
#include <string>
#include <boost/uuid/uuid.hpp>

Entity includes

#include <string>
#include "sqlgen/Timestamp.hpp"
#include "sqlgen/PrimaryKey.hpp"

Conventions

Table display

column header
party_id Party
unit_name Unit Name
unit_code Code
business_centre_code Business Centre
modified_by Modified By
version Version

Qt

Detail fields

field label widget type is_key is_required placeholder
unit_code Unit Code codeEdit line_edit true false Enter unit code
unit_name Unit Name nameEdit line_edit   true Enter unit name
business_centre_code Business Centre businessCentreEdit line_edit     Enter business centre code

Columns (Qt model)

enum_name field header type width
UnitCode unit_code Code string 120
UnitName unit_name Name string 250
BusinessCentreCode business_centre_code Business Centre string 130
Version version Version int 80
ModifiedBy modified_by Modified By string 120
RecordedAt recorded_at Recorded At timestamp 150

Custom repository methods

See also

Emacs 29.1 (Org mode 9.6.6)