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

Operational ledger leaf that holds trades. More...

#include <book.hpp>

Collaboration diagram for book:
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 book.
 
boost::uuids::uuid party_id
 Party that owns this book.
 
std::string name
 Book name, unique within party.
 
std::string description
 Optional free-text description of the book.
 
boost::uuids::uuid parent_portfolio_id
 Links to exactly one portfolio.
 
std::optional< boost::uuids::uuid > owner_unit_id
 Business unit that owns this book.
 
std::string ledger_ccy
 Functional/accounting currency.
 
std::string gl_account_ref
 Reference to external General Ledger.
 
std::string cost_center
 Internal finance code for P&L attribution.
 
std::string book_status
 Lifecycle status of the book.
 
int is_trading_book
 Basel III/IV classification.
 
std::string modified_by
 Username of the person who last modified this book.
 
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

Operational ledger leaf that holds trades.

Operational ledger leaves. The only entity that holds trades. Serves as the basis for accounting, ownership, and regulatory capital treatment. Must belong to exactly one portfolio.

Member Data Documentation

◆ id

boost::uuids::uuid id

UUID uniquely identifying this book.

Surrogate key for the book record.

◆ party_id

boost::uuids::uuid party_id

Party that owns this book.

References the parties table.

◆ name

std::string name

Book name, unique within party.

e.g., 'FXO_EUR_VOL_01'.

◆ parent_portfolio_id

boost::uuids::uuid parent_portfolio_id

Links to exactly one portfolio.

Mandatory: Every book must belong to a portfolio.

◆ owner_unit_id

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

Business unit that owns this book.

Optional FK to business_units. Should reference a unit that is an owner_unit_id in the book's portfolio ancestry chain.

◆ ledger_ccy

std::string ledger_ccy

Functional/accounting currency.

ISO 4217 currency code.

◆ gl_account_ref

std::string gl_account_ref

Reference to external General Ledger.

e.g., 'GL-10150-FXO'. Nullable if not integrated.

◆ cost_center

std::string cost_center

Internal finance code for P&L attribution.

Links to cost center in finance system.

◆ book_status

std::string book_status

Lifecycle status of the book.

References book_statuses lookup (Active, Closed, Frozen).

◆ is_trading_book

int is_trading_book

Basel III/IV classification.

1 = Trading Book, 0 = Banking Book.

◆ change_reason_code

std::string change_reason_code

Code identifying the reason for the change.

References change_reasons table (soft FK).