IF Commons GitHub

party

conceptpersonal data

Anyone or anything a business deals with as one, whether a person or an organization

Model arcaParty. Written in commons/data/models/arca/party.ts:103. Identified by partyId.

Governance: attributes

displayNametextrequiredpersonal data

The name the party is shown by, whatever its parts are

Becomes the column display_name of party.

Annotations: privacy.personal={"category":"Name","purposes":["show who the party is"]}

Written at commons/data/models/arca/party.ts:108

kindcode of partyKindrequired

Whether the party is a person or an organization

Becomes the column party_kind_code of party.

Written at commons/data/models/arca/party.ts:107

partyIdidentifierrequired

What identifies the party, made by the application when the party is created

Becomes the column party_id of party.

Written at commons/data/models/arca/party.ts:106

Logical: the table

Projects to the table party with the primary key party_id.

ColumnTypeNullRoleFrom
display_nametextfalseattributeparty.displayName
party_idtextfalseattributeparty.partyId
party_kind_codetextfalsereferenceparty.kind

Physical: SQL

CREATE TABLE IF NOT EXISTS "party" (
    "party_id" VARCHAR NOT NULL PRIMARY KEY,
    "party_kind_code" VARCHAR NOT NULL,
    "display_name" VARCHAR NOT NULL,
    CONSTRAINT "party_party_kind_code_fk" FOREIGN KEY ("party_kind_code") REFERENCES "party_kind" ("code")
);

Physical: the typed table

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

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

const rows = await from(party).select((s) => ({ partyId: s.party.partyId, partyKindCode: s.party.partyKindCode })).run(runner);

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