ores.trading.structure_identifier

Table of Contents

One identifier a structure is known by under one scheme: the deal reference a desk gives it, or the id an upstream document gave it. Each scheme is a trade id type code, and a structure has at most one value per scheme. The structure's own UUID is its identity and is not repeated here.

The row is keyed by the structure and references the structure it names with a database foreign key. A structure holds no party of its own, so nothing is copied from its parent. The issuer is the party or counterparty that issued the value, when it is known.

1. Flags

2. Columns

2.1. structure_id

The structure this identifier belongs to.

ctx.generate_uuid()

2.2. id_type

The scheme the value belongs to (e.g. UTI, USI, Internal, ORE).

std::string("Internal")

2.3. id_value

The identifier value under the scheme.

std::string("ID-") + std::string(faker::string::alphanumeric(10))

2.4. issuing_party_id

The party or counterparty that issued the value. Absent when the issuer is unknown.

std::nullopt

3. SQL

3.1. Flags

3.2. Checks

expression
"id_value" <> ''

3.3. Indexes

name columns unique current_only where_extra
value tenant_id, id_type, id_value true true  

A deal reference exists to address one deal, so a value under a scheme names at most one structure: two live structures cannot both be `STR-0010` under the same scheme. The index is over the current row only, so a value a structure used to carry does not block another from taking it later.

4. Foreign keys

4.1. structure_id

A database foreign key: the anchor is immutable.

4.2. id_type

The scheme catalogue is system reference data.

5. C++

5.1. Flags

5.2. Repository

5.3. Domain includes

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

5.4. Conventions

5.5. Table display

column header
structure_id Structure Id
id_type ID Type
id_value ID Value
modified_by Modified By
version Version

5.6. Custom repository methods

6. See also

Emacs 29.3 (Org mode 9.6.15)