kindcode of separationKindrequiredHow the separation is held
Becomes the column separation_kind_code of separation_rule.
Written at commons/data/models/identity-access/concepts.ts:76
A rule that no principal may hold too many of a set of roles together
Model identityAccess. Written in commons/data/models/identity-access/concepts.ts:71. Identified by separationRuleId.
kindcode of separationKindrequiredHow the separation is held
Becomes the column separation_kind_code of separation_rule.
Written at commons/data/models/identity-access/concepts.ts:76
limitCountintegerrequiredHow many of the roles together are too many: two for the classic pair
Becomes the column limit_count of separation_rule.
Written at commons/data/models/identity-access/concepts.ts:77
nametextrequiredWhat the rule is called
Becomes the column name of separation_rule.
Written at commons/data/models/identity-access/concepts.ts:75
separationRuleIdidentifierrequiredWhat identifies the rule, made by the application
Becomes the column separation_rule_id of separation_rule.
Written at commons/data/models/identity-access/concepts.ts:74
statuscode of useStatusrequiredWhether the rule is applied
Becomes the column status of separation_rule.
Written at commons/data/models/identity-access/concepts.ts:78
tenantoptionalThe tenant the rule is for; empty for the platform's To tenant. Written at commons/data/models/identity-access/concepts.ts:113
Projects to the table separation_rule with the primary key separation_rule_id.
| Column | Type | Null | Role | From |
|---|---|---|---|---|
limit_count | integer | false | attribute | separationRule.limitCount |
name | text | false | attribute | separationRule.name |
separation_kind_code | text | false | reference | separationRule.kind |
separation_rule_id | text | false | attribute | separationRule.separationRuleId |
status | text | false | attribute | separationRule.status |
tenant_id | text | true | reference | separationRule.tenant |
CREATE TABLE IF NOT EXISTS "separation_rule" (
"separation_rule_id" VARCHAR NOT NULL PRIMARY KEY,
"name" VARCHAR NOT NULL,
"separation_kind_code" VARCHAR NOT NULL,
"limit_count" INTEGER NOT NULL,
"status" VARCHAR NOT NULL,
"tenant_id" VARCHAR,
CONSTRAINT "separation_rule_separation_kind_code_fk" FOREIGN KEY ("separation_kind_code") REFERENCES "separation_kind" ("code"),
CONSTRAINT "separation_rule_tenant_id_fk" FOREIGN KEY ("tenant_id") REFERENCES "tenant" ("tenant_id"),
CONSTRAINT "separation_rule_status_ck" CHECK ("status" IN ('active', 'retired'))
);CREATE TABLE IF NOT EXISTS "separation_rule" (
"separation_rule_id" TEXT NOT NULL PRIMARY KEY,
"name" TEXT NOT NULL,
"separation_kind_code" TEXT NOT NULL,
"limit_count" INTEGER NOT NULL,
"status" TEXT NOT NULL,
"tenant_id" TEXT,
CONSTRAINT "separation_rule_separation_kind_code_fk" FOREIGN KEY ("separation_kind_code") REFERENCES "separation_kind" ("code"),
CONSTRAINT "separation_rule_tenant_id_fk" FOREIGN KEY ("tenant_id") REFERENCES "tenant" ("tenant_id"),
CONSTRAINT "separation_rule_status_ck" CHECK ("status" IN ('active', 'retired'))
);CREATE TABLE IF NOT EXISTS "separation_rule" (
"separation_rule_id" TEXT NOT NULL PRIMARY KEY,
"name" TEXT NOT NULL,
"separation_kind_code" TEXT NOT NULL,
"limit_count" INTEGER NOT NULL,
"status" TEXT NOT NULL,
"tenant_id" TEXT,
CONSTRAINT "separation_rule_separation_kind_code_fk" FOREIGN KEY ("separation_kind_code") REFERENCES "separation_kind" ("code"),
CONSTRAINT "separation_rule_tenant_id_fk" FOREIGN KEY ("tenant_id") REFERENCES "tenant" ("tenant_id"),
CONSTRAINT "separation_rule_status_ck" CHECK ("status" IN ('active', 'retired'))
);Read and written from TypeScript with the types the model gives: import { separationRule } from "@intellectual-frontiers/data/sql/typed/models". Generated in commons/data/sql/typed/models/identity-access.auto.ts: do not edit.
import { from } from "@intellectual-frontiers/data/sql/typed";
import { separationRule } from "@intellectual-frontiers/data/sql/typed/models";
const rows = await from(separationRule).select((s) => ({ separationRuleId: s.separationRule.separationRuleId, name: s.separationRule.name })).run(runner);