controlIdidentifierrequiredWhat identifies the control
Becomes the column control_id of control.
Written at commons/data/models/contract/mod.ts:109
A control: what must hold, who answers for it, how often it is checked and the test or evidence that checks it, one row of the control matrix
Model contract. Written in commons/data/models/contract/mod.ts:106. Identified by controlId.
controlIdidentifierrequiredWhat identifies the control
Becomes the column control_id of control.
Written at commons/data/models/contract/mod.ts:109
evidenceReftextrequiredThe test, spec or report that checks it
Becomes the column evidence_ref of control.
Written at commons/data/models/contract/mod.ts:113
frameworktextoptionalThe framework or rule it answers to, where one
Becomes the column framework of control.
Written at commons/data/models/contract/mod.ts:114
frequencytextrequiredHow often it is checked, as a number of days
Becomes the column frequency of control.
Written at commons/data/models/contract/mod.ts:112
objectivetextrequiredWhat must hold
Becomes the column objective of control.
Written at commons/data/models/contract/mod.ts:110
ownertextrequiredWho answers for it
Becomes the column owner of control.
Written at commons/data/models/contract/mod.ts:111
Projects to the table control with the primary key control_id.
| Column | Type | Null | Role | From |
|---|---|---|---|---|
control_id | text | false | attribute | control.controlId |
evidence_ref | text | false | attribute | control.evidenceRef |
framework | text | true | attribute | control.framework |
frequency | text | false | attribute | control.frequency |
objective | text | false | attribute | control.objective |
owner | text | false | attribute | control.owner |
CREATE TABLE IF NOT EXISTS "control" (
"control_id" VARCHAR NOT NULL PRIMARY KEY,
"objective" VARCHAR NOT NULL,
"owner" VARCHAR NOT NULL,
"frequency" VARCHAR NOT NULL,
"evidence_ref" VARCHAR NOT NULL,
"framework" VARCHAR
);CREATE TABLE IF NOT EXISTS "control" (
"control_id" TEXT NOT NULL PRIMARY KEY,
"objective" TEXT NOT NULL,
"owner" TEXT NOT NULL,
"frequency" TEXT NOT NULL,
"evidence_ref" TEXT NOT NULL,
"framework" TEXT
);CREATE TABLE IF NOT EXISTS "control" (
"control_id" TEXT NOT NULL PRIMARY KEY,
"objective" TEXT NOT NULL,
"owner" TEXT NOT NULL,
"frequency" TEXT NOT NULL,
"evidence_ref" TEXT NOT NULL,
"framework" TEXT
);Read and written from TypeScript with the types the model gives: import { control } from "@intellectual-frontiers/data/sql/typed/models". Generated in commons/data/sql/typed/models/contract.auto.ts: do not edit.
import { from } from "@intellectual-frontiers/data/sql/typed";
import { control } from "@intellectual-frontiers/data/sql/typed/models";
const rows = await from(control).select((s) => ({ controlId: s.control.controlId, objective: s.control.objective })).run(runner);