IF Commons GitHub

partyIdentifier

conceptpersonal data

An identifier a party holds, as someone else issued it: a tax number, a passport number; a party holds one of a kind once

Model arcaParty. Written in commons/data/models/arca/party.ts:196. Identified by partyIdentifierId.

Governance: attributes

identifiertextrequiredpersonal data

The identifier itself, as it was issued

Becomes the column identifier of party_identifier.

Annotations: privacy.personal={"category":"Identifier","purposes":["identify the party to authorities and counterparties"]}

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

issuedBytextoptional

Who issued the identifier

Becomes the column issued_by of party_identifier.

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

kindcode of partyIdentifierKindrequired

The kind of identifier

Becomes the column party_identifier_kind_code of party_identifier.

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

partyIdentifierIdidentifierrequired

What identifies the identifier as Arca keeps it

Becomes the column party_identifier_id of party_identifier.

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

Governance: relationships

partyone

The party who holds the identifier To party. Written at commons/data/models/arca/party.ts:196

Logical: the table

Projects to the table party_identifier with the primary key party_identifier_id.

ColumnTypeNullRoleFrom
identifiertextfalseattributepartyIdentifier.identifier
issued_bytexttrueattributepartyIdentifier.issuedBy
party_idtextfalsereferencepartyIdentifier.party
party_identifier_idtextfalseattributepartyIdentifier.partyIdentifierId
party_identifier_kind_codetextfalsereferencepartyIdentifier.kind

Physical: SQL

CREATE TABLE IF NOT EXISTS "party_identifier" (
    "party_identifier_id" VARCHAR NOT NULL PRIMARY KEY,
    "party_identifier_kind_code" VARCHAR NOT NULL,
    "identifier" VARCHAR NOT NULL,
    "issued_by" VARCHAR,
    "party_id" VARCHAR NOT NULL,
    CONSTRAINT "party_identifier_party_identifier_kind_code_fk" FOREIGN KEY ("party_identifier_kind_code") REFERENCES "party_identifier_kind" ("code"),
    CONSTRAINT "party_identifier_party_id_fk" FOREIGN KEY ("party_id") REFERENCES "party" ("party_id"),
    CONSTRAINT "party_identifier_party_id_party_identifier_kind_code_uq" UNIQUE ("party_id", "party_identifier_kind_code")
);

Physical: the typed table

Read and written from TypeScript with the types the model gives: import { partyIdentifier } 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 { partyIdentifier } from "@intellectual-frontiers/data/sql/typed/models";

const rows = await from(partyIdentifier).select((s) => ({ partyIdentifierId: s.partyIdentifier.partyIdentifierId, partyIdentifierKindCode: s.partyIdentifier.partyIdentifierKindCode })).run(runner);

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