domaintextrequiredThe domain, unique across every tenant
Becomes the column domain of verified_domain.
Written at commons/data/models/identity/concepts.ts:357
A domain that a tenant has proved to be its own, and what that means for those who sign in with it
Model identity. Written in commons/data/models/identity/concepts.ts:353. Identified by verifiedDomainId.
domaintextrequiredThe domain, unique across every tenant
Becomes the column domain of verified_domain.
Written at commons/data/models/identity/concepts.ts:357
lastCheckedAtinstantoptionalWhen it was last checked still to be the tenant's
Becomes the column last_checked_at of verified_domain.
Written at commons/data/models/identity/concepts.ts:360
policycode of domainPolicyrequiredWhat it means for those who sign in with it
Becomes the column policy of verified_domain.
Written at commons/data/models/identity/concepts.ts:359
verifiedAtinstantrequiredWhen it was proved
Becomes the column verified_at of verified_domain.
Written at commons/data/models/identity/concepts.ts:358
verifiedDomainIdidentifierrequiredWhat identifies the domain, made by the application
Becomes the column verified_domain_id of verified_domain.
Written at commons/data/models/identity/concepts.ts:356
tenantoneThe tenant it is proved for To tenant. Written at commons/data/models/identity/concepts.ts:466
Projects to the table verified_domain with the primary key verified_domain_id.
| Column | Type | Null | Role | From |
|---|---|---|---|---|
domain | text | false | attribute | verifiedDomain.domain |
last_checked_at | timestamp | true | attribute | verifiedDomain.lastCheckedAt |
policy | text | false | attribute | verifiedDomain.policy |
tenant_id | text | false | reference | verifiedDomain.tenant |
verified_at | timestamp | false | attribute | verifiedDomain.verifiedAt |
verified_domain_id | text | false | attribute | verifiedDomain.verifiedDomainId |
CREATE TABLE IF NOT EXISTS "verified_domain" (
"verified_domain_id" VARCHAR NOT NULL PRIMARY KEY,
"domain" VARCHAR NOT NULL,
"verified_at" TIMESTAMPTZ NOT NULL,
"policy" VARCHAR NOT NULL,
"last_checked_at" TIMESTAMPTZ,
"tenant_id" VARCHAR NOT NULL,
CONSTRAINT "verified_domain_tenant_id_fk" FOREIGN KEY ("tenant_id") REFERENCES "tenant" ("tenant_id"),
CONSTRAINT "verified_domain_domain_uq" UNIQUE ("domain"),
CONSTRAINT "verified_domain_policy_ck" CHECK ("policy" IN ('none', 'capture_users', 'enforce_sso'))
);CREATE TABLE IF NOT EXISTS "verified_domain" (
"verified_domain_id" TEXT NOT NULL PRIMARY KEY,
"domain" TEXT NOT NULL,
"verified_at" TIMESTAMPTZ NOT NULL,
"policy" TEXT NOT NULL,
"last_checked_at" TIMESTAMPTZ,
"tenant_id" TEXT NOT NULL,
CONSTRAINT "verified_domain_tenant_id_fk" FOREIGN KEY ("tenant_id") REFERENCES "tenant" ("tenant_id"),
CONSTRAINT "verified_domain_domain_uq" UNIQUE ("domain"),
CONSTRAINT "verified_domain_policy_ck" CHECK ("policy" IN ('none', 'capture_users', 'enforce_sso'))
);CREATE TABLE IF NOT EXISTS "verified_domain" (
"verified_domain_id" TEXT NOT NULL PRIMARY KEY,
"domain" TEXT NOT NULL,
"verified_at" TEXT NOT NULL,
"policy" TEXT NOT NULL,
"last_checked_at" TEXT,
"tenant_id" TEXT NOT NULL,
CONSTRAINT "verified_domain_tenant_id_fk" FOREIGN KEY ("tenant_id") REFERENCES "tenant" ("tenant_id"),
CONSTRAINT "verified_domain_domain_uq" UNIQUE ("domain"),
CONSTRAINT "verified_domain_policy_ck" CHECK ("policy" IN ('none', 'capture_users', 'enforce_sso'))
);Read and written from TypeScript with the types the model gives: import { verifiedDomain } 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 { verifiedDomain } from "@intellectual-frontiers/data/sql/typed/models";
const rows = await from(verifiedDomain).select((s) => ({ verifiedDomainId: s.verifiedDomain.verifiedDomainId, domain: s.verifiedDomain.domain })).run(runner);