ores.inbox.notification

Table of Contents

One thing that happened: its kind, who raised it and when, and where it is dealt with. The values its message names are rows of ores.inbox.notification_argument, and the people it reaches are rows of ores.inbox.notification_recipient, each with their own read state.

Every notification links to where it is dealt with: link_route names the screen, and link_id names the thing on it, when there is one. A notification never asks a person to act inside it, and it carries no password, token or trade economics, because mail leaves the system.

When a notification is raised to every holder of a permission, the permission is resolved into recipient rows at that moment, and audience_permission_code records which permission it was.

1. Flags

2. Columns

2.1. id

UUID primary key for the notification.

2.2. kind_code

What kind of thing happened. FK reference to ores_inbox_notification_kinds_tbl, which the system tenant holds.

2.3. raised_by

The account that raised it: a person, or a service through its own account. FK reference to ores_iam_accounts_tbl.

2.4. raised_at

When it was raised.

std::chrono::system_clock::now()

2.5. link_route

The screen where the notification is dealt with.

Examples: 'requests', 'tenants'.

std::string(faker::word::noun())

2.6. link_id

The thing on that screen, such as a request's id, or null when the screen is the whole of the link.

std::nullopt

2.7. audience_permission_code

The permission whose holders the notification was raised to, or null when it was raised to named people. FK reference to ores_iam_permissions_tbl.

std::nullopt

3. Foreign keys

3.1. kind_code

The lookup is system reference data, so the check reads the system tenant.

3.2. raised_by

Accounts are a global registry: every tenant owns its own, and the services that act on any tenant's behalf live in the system tenant. So the raiser is an account of the notice's own tenant or one of the system tenant's, and a notice a tenant's people must be told about is raisable even when no person in that tenant raised it. The sweep that closes a lapsed approval request is exactly that case: it runs as the inbox service, which holds no account outside the system tenant, and it still tells the person who asked.

3.3. audience_permission_code

Permissions are held by the system tenant, so the check reads it.

4. SQL

4.1. Flags

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
id ID
kind_code Kind
raised_by Raised By
raised_at Raised At
link_route Link
modified_by Modified By
version Version

5.6. Custom repository methods

6. See also

Emacs 29.3 (Org mode 9.6.15)