expiresAtinstantoptionalWhen it runs out
Becomes the column expires_at of limit.
Written at commons/data/models/operations/mod.ts:94
A certificate, key, quota, licence or agreement that runs out or fills, with when and who renews it: the inventory of what will stop the platform if nobody acts
Model operations. Written in commons/data/models/operations/mod.ts:94. Identified by limitId.
expiresAtinstantoptionalWhen it runs out
Becomes the column expires_at of limit.
Written at commons/data/models/operations/mod.ts:94
kindcode of limitKindrequiredlimitIdidentifierrequiredWhat identifies the limit
Becomes the column limit_id of limit.
Written at commons/data/models/operations/mod.ts:94
nametextrequiredownertextrequiredrenewalLeadDaysintegerrequiredHow many days before it runs out someone must act
Becomes the column renewal_lead_days of limit.
Written at commons/data/models/operations/mod.ts:94
Projects to the table limit with the primary key limit_id.
| Column | Type | Null | Role | From |
|---|---|---|---|---|
expires_at | timestamp | true | attribute | limit.expiresAt |
kind | text | false | attribute | limit.kind |
limit_id | text | false | attribute | limit.limitId |
name | text | false | attribute | limit.name |
owner | text | false | attribute | limit.owner |
renewal_lead_days | integer | false | attribute | limit.renewalLeadDays |
CREATE TABLE IF NOT EXISTS "limit" (
"limit_id" VARCHAR NOT NULL PRIMARY KEY,
"name" VARCHAR NOT NULL,
"kind" VARCHAR NOT NULL,
"expires_at" TIMESTAMPTZ,
"owner" VARCHAR NOT NULL,
"renewal_lead_days" INTEGER NOT NULL,
CONSTRAINT "limit_kind_ck" CHECK ("kind" IN ('certificate', 'credential', 'quota', 'license', 'agreement'))
);CREATE TABLE IF NOT EXISTS "limit" (
"limit_id" TEXT NOT NULL PRIMARY KEY,
"name" TEXT NOT NULL,
"kind" TEXT NOT NULL,
"expires_at" TIMESTAMPTZ,
"owner" TEXT NOT NULL,
"renewal_lead_days" INTEGER NOT NULL,
CONSTRAINT "limit_kind_ck" CHECK ("kind" IN ('certificate', 'credential', 'quota', 'license', 'agreement'))
);CREATE TABLE IF NOT EXISTS "limit" (
"limit_id" TEXT NOT NULL PRIMARY KEY,
"name" TEXT NOT NULL,
"kind" TEXT NOT NULL,
"expires_at" TEXT,
"owner" TEXT NOT NULL,
"renewal_lead_days" INTEGER NOT NULL,
CONSTRAINT "limit_kind_ck" CHECK ("kind" IN ('certificate', 'credential', 'quota', 'license', 'agreement'))
);Read and written from TypeScript with the types the model gives: import { limit } from "@intellectual-frontiers/data/sql/typed/models". Generated in commons/data/sql/typed/models/operations.auto.ts: do not edit.
import { from } from "@intellectual-frontiers/data/sql/typed";
import { limit } from "@intellectual-frontiers/data/sql/typed/models";
const rows = await from(limit).select((s) => ({ limitId: s.limit.limitId, name: s.limit.name })).run(runner);