IF Commons GitHub

manifest

concept

What a sender says a batch holds: the count to be accounted for, from which every stage and every loss is reconciled

Model flow. Written in commons/data/models/flow/mod.ts:167. Identified by manifestId.

Governance: attributes

manifestCountintegerrequired

How many entities the sender says it sent

Becomes the column manifest_count of manifest.

Written at commons/data/models/flow/mod.ts:167

manifestIdidentifierrequired

What identifies the batch

Becomes the column manifest_id of manifest.

Written at commons/data/models/flow/mod.ts:167

periodtextoptional

The period it covers

Becomes the column period of manifest.

Written at commons/data/models/flow/mod.ts:167

sourcetextrequired

The sender

Becomes the column source of manifest.

Written at commons/data/models/flow/mod.ts:167

Governance: relationships

loadone

The load that carried it To load. Written at commons/data/models/flow/mod.ts:167

Logical: the table

Projects to the table manifest with the primary key manifest_id.

ColumnTypeNullRoleFrom
load_idtextfalsereferencemanifest.load
manifest_countintegerfalseattributemanifest.manifestCount
manifest_idtextfalseattributemanifest.manifestId
periodtexttrueattributemanifest.period
sourcetextfalseattributemanifest.source

Physical: SQL

CREATE TABLE IF NOT EXISTS "manifest" (
    "manifest_id" VARCHAR NOT NULL PRIMARY KEY,
    "source" VARCHAR NOT NULL,
    "period" VARCHAR,
    "manifest_count" INTEGER NOT NULL,
    "load_id" VARCHAR NOT NULL,
    CONSTRAINT "manifest_load_id_fk" FOREIGN KEY ("load_id") REFERENCES "load" ("load_id")
);

Physical: the typed table

Read and written from TypeScript with the types the model gives: import { manifest } from "@intellectual-frontiers/data/sql/typed/models". Generated in commons/data/sql/typed/models/flow.auto.ts: do not edit.

import { from } from "@intellectual-frontiers/data/sql/typed";
import { manifest } from "@intellectual-frontiers/data/sql/typed/models";

const rows = await from(manifest).select((s) => ({ manifestId: s.manifest.manifestId, source: s.manifest.source })).run(runner);

Titles, headings, exports, tables, columns and requirements. Esc closes.