IF Commons GitHub

electronicContact

conceptpersonal data

A way to reach a party over a network: an email address, a telephone number, a web address

Model arcaParty. Written in commons/data/models/arca/party.ts:213. Identified by electronicContactId.

Governance: attributes

addresstextrequiredpersonal data

The address or number itself

Becomes the column address of electronic_contact.

Annotations: privacy.personal={"category":"Contact","purposes":["reach the party"]}

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

electronicContactIdidentifierrequired

What identifies the contact point

Becomes the column electronic_contact_id of electronic_contact.

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

isPrimarybooleanrequired

Whether this is the first way to try for its medium

Becomes the column is_primary of electronic_contact.

Annotations: quality.default=false

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

mediumcode of contactMediumrequired

Whether this is an email address, a telephone number or a web address

Becomes the column medium of electronic_contact.

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

Governance: relationships

partyone

The party reached this way To party. Written at commons/data/models/arca/party.ts:213

Logical: the table

Projects to the table electronic_contact with the primary key electronic_contact_id.

ColumnTypeNullRoleFrom
addresstextfalseattributeelectronicContact.address
electronic_contact_idtextfalseattributeelectronicContact.electronicContactId
is_primarybooleanfalseattributeelectronicContact.isPrimary
mediumtextfalseattributeelectronicContact.medium
party_idtextfalsereferenceelectronicContact.party

Physical: SQL

CREATE TABLE IF NOT EXISTS "electronic_contact" (
    "electronic_contact_id" VARCHAR NOT NULL PRIMARY KEY,
    "medium" VARCHAR NOT NULL,
    "address" VARCHAR NOT NULL,
    "is_primary" BOOLEAN NOT NULL DEFAULT FALSE,
    "party_id" VARCHAR NOT NULL,
    CONSTRAINT "electronic_contact_party_id_fk" FOREIGN KEY ("party_id") REFERENCES "party" ("party_id"),
    CONSTRAINT "electronic_contact_medium_ck" CHECK ("medium" IN ('email', 'telephone', 'web'))
);

Physical: the typed table

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

const rows = await from(electronicContact).select((s) => ({ electronicContactId: s.electronicContact.electronicContactId, medium: s.electronicContact.medium })).run(runner);

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