IF Commons GitHub

domainClaim

concept

A claim on a domain, waiting to be proved

Model identity. Written in commons/data/models/identity/concepts.ts:336. Identified by domainClaimId.

Governance: attributes

challengeValuetextrequired

What is to be published to prove it; public by design

Becomes the column challenge_value of domain_claim.

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

domaintextrequired

The domain claimed

Becomes the column domain of domain_claim.

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

domainClaimIdidentifierrequired

What identifies the claim, made by the application

Becomes the column domain_claim_id of domain_claim.

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

expiresAtinstantrequired

When it stops being valid

Becomes the column expires_at of domain_claim.

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

methodcode of claimMethodrequired

How it is to be proved

Becomes the column method of domain_claim.

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

requestedAtinstantrequired

When it was asked for

Becomes the column requested_at of domain_claim.

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

statuscode of claimStatusrequired

Where it is

Becomes the column status of domain_claim.

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

Governance: relationships

tenantone

The tenant that claims it To tenant. Written at commons/data/models/identity/concepts.ts:466

Logical: the table

Projects to the table domain_claim with the primary key domain_claim_id.

ColumnTypeNullRoleFrom
challenge_valuetextfalseattributedomainClaim.challengeValue
domaintextfalseattributedomainClaim.domain
domain_claim_idtextfalseattributedomainClaim.domainClaimId
expires_attimestampfalseattributedomainClaim.expiresAt
methodtextfalseattributedomainClaim.method
requested_attimestampfalseattributedomainClaim.requestedAt
statustextfalseattributedomainClaim.status
tenant_idtextfalsereferencedomainClaim.tenant

Physical: SQL

CREATE TABLE IF NOT EXISTS "domain_claim" (
    "domain_claim_id" VARCHAR NOT NULL PRIMARY KEY,
    "domain" VARCHAR NOT NULL,
    "challenge_value" VARCHAR NOT NULL,
    "method" VARCHAR NOT NULL,
    "status" VARCHAR NOT NULL,
    "requested_at" TIMESTAMPTZ NOT NULL,
    "expires_at" TIMESTAMPTZ NOT NULL,
    "tenant_id" VARCHAR NOT NULL,
    CONSTRAINT "domain_claim_tenant_id_fk" FOREIGN KEY ("tenant_id") REFERENCES "tenant" ("tenant_id"),
    CONSTRAINT "domain_claim_method_ck" CHECK ("method" IN ('dns_txt', 'http_file', 'email')),
    CONSTRAINT "domain_claim_status_ck" CHECK ("status" IN ('pending', 'failed', 'expired'))
);

Physical: the typed table

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

const rows = await from(domainClaim).select((s) => ({ domainClaimId: s.domainClaim.domainClaimId, domain: s.domainClaim.domain })).run(runner);

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