Organizations
Industry identity, organization status, and internal dialogue notes
An organization is the industry-side company, university, federally funded research and development center (FFRDC), university affiliated research center (UARC), foreign partner, or other participant. It is separate from the person who logs in: one organization may have multiple User rows.
Organization
| Column | Prisma type | Required? | Default | Meaning |
|---|---|---|---|---|
id | String | Yes | cuid() | Organization identifier. |
name | String | Yes; unique | None | Registered organization name. |
orgType | OrgType | Yes | COMPANY | Organization category. |
status | OrgStatus | Yes | NEW | Government review/lifecycle state. |
cageCode | String? | No | NULL | Commercial and Government Entity identifier. |
uei | String? | No | NULL | Unique Entity Identifier used in federal systems. |
dunsNumber | String? | No | NULL | Nine-digit DUNS identifier. |
naicsCodes | String[] | Yes | [] | Six-digit NAICS industry classification codes, at most 10. |
setAsides | SetAsideStatus[] | Yes | [] | Claimed socioeconomic set-aside categories. |
smallBusiness | Boolean | Yes | false | Derived: true when setAsides is non-empty; recomputed on every profile save. |
nontraditional | Boolean | Yes | false | Whether it identifies as a nontraditional defense contractor. |
website | String? | No | NULL | Public website. |
addressLine1 / addressLine2 | String? | No | NULL | Street address. |
city | String? | No | NULL | City. |
state | String? | No | NULL | State or region. |
postalCode | String? | No | NULL | Postal code. |
country | String | Yes | "USA" | Country label. |
pocName / pocEmail / pocPhone | String? | No | NULL | Primary point of contact. |
contractsPocName / contractsPocEmail / contractsPocPhone | String? | No | NULL | Contracts point of contact. |
employeeCount | Int? | No | NULL | Employee headcount. |
annualRevenueUsd | BigInt? | No | NULL | Annual revenue in whole US dollars. |
businessStartYear | Int? | No | NULL | Founding year. |
samRegistrationStatus | SamRegistrationStatus? | No | NULL | ACTIVE, PENDING, EXPIRED, or NOT_REGISTERED. |
samExpirationDate | DateTime? | No | NULL | SAM registration expiration. |
description | String? | No | NULL | Organization summary. |
techTags | String | Yes | "" | Lowercase comma-separated capabilities. |
createdAt | DateTime | Yes | now() | Registration time. |
updatedAt | DateTime | Yes | @updatedAt | Last profile update. |
Relations are users, submissions, engagements (denormalized primary-organization backlinks), engagementLinks (EngagementOrganization join rows — the authoritative engagement relation), and dialogueNotes. The portal profile route intentionally exposes only editable profile fields; government-only status and dialogue are controlled by separate government routes.
OrgType enum
| Value | Meaning |
|---|---|
COMPANY | Commercial company. |
ACADEMIA | University or academic laboratory. |
FFRDC | Federally funded research and development center. |
UARC | University affiliated research center. |
FOREIGN_PARTNER | Foreign partner organization. |
OTHER | Another organization type not represented above. |
SetAsideStatus enum
| Value | Meaning |
|---|---|
SMALL_BUSINESS | Small Business. |
EIGHT_A | SBA 8(a) Business Development participant. |
WOSB | Woman-Owned Small Business. |
EDWOSB | Economically Disadvantaged Woman-Owned Small Business. |
SDVOSB | Service-Disabled Veteran-Owned Small Business. |
HUBZONE | HUBZone-certified small business. |
Selecting any value implies small-business status: the profile and registration routes store smallBusiness = setAsides.length > 0.
OrgStatus enum
| Value | Meaning |
|---|---|
NEW | Newly registered or newly encountered. |
UNDER_REVIEW | Government review is in progress. |
ACTIVE | Participating organization in good standing for the pilot. |
WATCHLIST | Requires additional attention or coordination. |
INACTIVE | Not currently active in the ledger. |
OrgDialogueNote
| Column | Prisma type | Required? | Default | Meaning |
|---|---|---|---|---|
id | String | Yes | cuid() | Note identifier. |
organizationId | String | Yes | None | Organization discussed. |
authorId | String | Yes | None | Government user who wrote it. |
body | String | Yes | None | Internal dialogue context. |
createdAt | DateTime | Yes | now() | Creation time. |
The organization and author relations make the note auditable. These notes are not the same as a public description or an industry submission; they are government ledger context.
Lifecycle
The registration route creates the organization and its first industry user transactionally. A government status update changes only the status field and writes an audit event; it does not delete submissions or engagements.
Optional identity fields
CAGE, UEI, DUNS, NAICS codes, and the SAM registration fields are optional because an organization may begin discovery before all registration identifiers are available. The API validates their formats (5 alphanumeric characters for CAGE, 9 digits for DUNS, six digits per NAICS code); it treats them as self-reported identifiers rather than resolving them against an external registry. A blank form value is normalized to an empty or null-compatible stored value according to the route.
country defaults to USA in the database even though the registration form does not require a country field. nontraditional is a distinct field from smallBusiness: the seed data derives one from the other for convenience, but the two flags are independent in the model and should be set independently for real records.
Organization name is unique. Profile updates do not rename the organization, which prevents an industry contact from changing the identity used in historical engagement and submission records.
