IF Commons GitHub

contactVerification

concept

The proof that an address is a person's

Model identity. Written in commons/data/models/identity/concepts.ts:85. Identified by contactVerificationId.

Governance: attributes

contactVerificationIdidentifierrequired

What identifies the verification, made by the application

Becomes the column contact_verification_id of contact_verification.

Written at commons/data/models/identity/concepts.ts:88

methodcode of verificationMethodrequired

How it was proved

Becomes the column method of contact_verification.

Written at commons/data/models/identity/concepts.ts:90

verifiedAtinstantrequired

When the address was proved to be the person's

Becomes the column verified_at of contact_verification.

Written at commons/data/models/identity/concepts.ts:89

Governance: relationships

contactone

The address that was proved To electronicContact. Written at commons/data/models/identity/concepts.ts:85

Logical: the table

Projects to the table contact_verification with the primary key contact_verification_id.

ColumnTypeNullRoleFrom
contact_electronic_contact_idtextfalsereferencecontactVerification.contact
contact_verification_idtextfalseattributecontactVerification.contactVerificationId
methodtextfalseattributecontactVerification.method
verified_attimestampfalseattributecontactVerification.verifiedAt

Physical: SQL

CREATE TABLE IF NOT EXISTS "contact_verification" (
    "contact_verification_id" VARCHAR NOT NULL PRIMARY KEY,
    "verified_at" TIMESTAMPTZ NOT NULL,
    "method" VARCHAR NOT NULL,
    "contact_electronic_contact_id" VARCHAR NOT NULL,
    CONSTRAINT "contact_verification_contact_electronic_contact_id_fk" FOREIGN KEY ("contact_electronic_contact_id") REFERENCES "electronic_contact" ("electronic_contact_id"),
    CONSTRAINT "contact_verification_contact_electronic_contact_id_uq" UNIQUE ("contact_electronic_contact_id"),
    CONSTRAINT "contact_verification_method_ck" CHECK ("method" IN ('email_link', 'otp', 'directory_asserted', 'admin'))
);

Physical: the typed table

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

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

const rows = await from(contactVerification).select((s) => ({ contactVerificationId: s.contactVerification.contactVerificationId, verifiedAt: s.contactVerification.verifiedAt })).run(runner);

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