IF Commons GitHub

organization

concept

A party that is a company, an agency, a club or any other body

Model arcaParty. Written in commons/data/models/arca/party.ts:145. Identified by party.

Governance: attributes

foundedOndateoptional

The day the organization was founded

Becomes the column founded_on of organization.

Written at commons/data/models/arca/party.ts:149

legalNametextrequired

The name the organization is registered under

Becomes the column legal_name of organization.

Written at commons/data/models/arca/party.ts:148

Governance: relationships

partyone

The party the organization is To party. Written at commons/data/models/arca/party.ts:145

Logical: the table

Projects to the table organization with the primary key party_id.

ColumnTypeNullRoleFrom
founded_ondatetrueattributeorganization.foundedOn
legal_nametextfalseattributeorganization.legalName
party_idtextfalsereferenceorganization.party

Physical: SQL

CREATE TABLE IF NOT EXISTS "organization" (
    "party_id" VARCHAR NOT NULL PRIMARY KEY,
    "legal_name" VARCHAR NOT NULL,
    "founded_on" DATE,
    CONSTRAINT "organization_party_id_fk" FOREIGN KEY ("party_id") REFERENCES "party" ("party_id")
);

Physical: the typed table

Read and written from TypeScript with the types the model gives: import { organization } from "@intellectual-frontiers/data/sql/typed/models". Generated in commons/data/sql/typed/models/arca-party.auto.ts: do not edit.

import { from } from "@intellectual-frontiers/data/sql/typed";
import { organization } from "@intellectual-frontiers/data/sql/typed/models";

const rows = await from(organization).select((s) => ({ partyId: s.organization.partyId, legalName: s.organization.legalName })).run(runner);

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