Files
helmdocs-proposal-system/migrations/meta/0004_snapshot.json
Croissant Le Doux fdb0aeac5d Close #29: the v1 rate structure types
Price is a rate function, not a scalar (#22), and #15 bars any model from
evaluating one — so the shapes have to be closed AND computable. This replaces
the src/pricing seam with a composition rather than an enumeration: one base
schedule deciding unit price, plus closed modifiers, plus an optional floor.
Three vendors on one small RFP already produced five cells of the alternative
cross-product, and two of the three are the same object wearing different
decoration.

The scenario vocabulary is closed too, and published with the RFP, so every bid
in a field is priced against identical assumptions. A structure reading a
variable the RFP never declared is rejected at submission, while the vendor can
still fix it.

Abstention is typed. `input_missing` is separated from `shape_unsupported`
because Chesapeake's shape is fully supported and its unit price simply is not
in the document — that is recoverable by asking, and collapsing the two throws
away the only actionable fact. Null is never zero, never the vendor's stated
figure, and never a partial sum.

The derivation is the record. A bare scalar can only assert; a protest asks why
a bid ranked where it did. Lines accumulate as exact rationals in bigint and
round once, half-up. A scenario amendment voids derived costs rather than
recomputing them.

Exceptions carry a closed consequence union. Anacostia's EX-3 says the vendor
cannot bid produce at all if declined — a nullable price delta reads that as "no
cost impact", the inverse of the truth, on the most consequential of the three.

Two defects the corpus check caught that review would not have:

  - The band ladder priced two ways depending on a flag. `to` is inclusive, and
    subtracting those bounds in the marginal path lost the unit between bands —
    one in 21,400, invisible in the total and wrong in the record.

  - The published scenario was quantizing the price before the evaluator saw it.
    Twelve basis-point shares moved the seasonal factor by 3e-5, about $19 on a
    $624,000 line. Weights, not shares: a school calendar publishes instructional
    days, an exact integer, and the ratio is taken last.

  npm run check:pricing

Potomac computes $589,570.00 and not the stated $589,970.00; Chesapeake abstains
naming base.unitPrice; Anacostia is $649,792.00 with the calendar and unpriceable
without it; a 3-of-4-line bid withholds its total.

Migrations generated in two passes so drizzle-kit never needed the interactive
rename prompt. No SQL hand-edited.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-04 02:39:20 -04:00

3206 lines
84 KiB
JSON

{
"id": "a9fe26ae-065d-49b1-9ab2-791e76db9e70",
"prevId": "69fe6962-32d6-460e-8144-0055a2e84401",
"version": "7",
"dialect": "postgresql",
"tables": {
"public.actor": {
"name": "actor",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"email": {
"name": "email",
"type": "text",
"primaryKey": false,
"notNull": true
},
"display_name": {
"name": "display_name",
"type": "text",
"primaryKey": false,
"notNull": true
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"actor_email_unique": {
"name": "actor_email_unique",
"nullsNotDistinct": false,
"columns": [
"email"
]
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.membership": {
"name": "membership",
"schema": "",
"columns": {
"actor_id": {
"name": "actor_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"org_id": {
"name": "org_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
}
},
"indexes": {},
"foreignKeys": {
"membership_actor_id_actor_id_fk": {
"name": "membership_actor_id_actor_id_fk",
"tableFrom": "membership",
"tableTo": "actor",
"columnsFrom": [
"actor_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"membership_org_id_organization_id_fk": {
"name": "membership_org_id_organization_id_fk",
"tableFrom": "membership",
"tableTo": "organization",
"columnsFrom": [
"org_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {
"membership_actor_id_org_id_pk": {
"name": "membership_actor_id_org_id_pk",
"columns": [
"actor_id",
"org_id"
]
}
},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.org_capability": {
"name": "org_capability",
"schema": "",
"columns": {
"org_id": {
"name": "org_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"capability": {
"name": "capability",
"type": "capability",
"typeSchema": "public",
"primaryKey": false,
"notNull": true
},
"granted_at": {
"name": "granted_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {
"org_capability_org_id_organization_id_fk": {
"name": "org_capability_org_id_organization_id_fk",
"tableFrom": "org_capability",
"tableTo": "organization",
"columnsFrom": [
"org_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {
"org_capability_org_id_capability_pk": {
"name": "org_capability_org_id_capability_pk",
"columns": [
"org_id",
"capability"
]
}
},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.organization": {
"name": "organization",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"legal_name": {
"name": "legal_name",
"type": "text",
"primaryKey": false,
"notNull": true
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.roster_entry": {
"name": "roster_entry",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"retailer_org_id": {
"name": "retailer_org_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true
},
"contact_email": {
"name": "contact_email",
"type": "text",
"primaryKey": false,
"notNull": false
},
"duns": {
"name": "duns",
"type": "text",
"primaryKey": false,
"notNull": false
},
"claimed_vendor_org_id": {
"name": "claimed_vendor_org_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"claimed_at": {
"name": "claimed_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {
"roster_entry_retailer_org_id_organization_id_fk": {
"name": "roster_entry_retailer_org_id_organization_id_fk",
"tableFrom": "roster_entry",
"tableTo": "organization",
"columnsFrom": [
"retailer_org_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"roster_entry_claimed_vendor_org_id_organization_id_fk": {
"name": "roster_entry_claimed_vendor_org_id_organization_id_fk",
"tableFrom": "roster_entry",
"tableTo": "organization",
"columnsFrom": [
"claimed_vendor_org_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"roster_entry_retailer_org_id_name_unique": {
"name": "roster_entry_retailer_org_id_name_unique",
"nullsNotDistinct": false,
"columns": [
"retailer_org_id",
"name"
]
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.category_change_event": {
"name": "category_change_event",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"kind": {
"name": "kind",
"type": "category_change_kind",
"typeSchema": "public",
"primaryKey": false,
"notNull": true
},
"retailer_org_id": {
"name": "retailer_org_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"from_ids": {
"name": "from_ids",
"type": "uuid[]",
"primaryKey": false,
"notNull": true
},
"to_ids": {
"name": "to_ids",
"type": "uuid[]",
"primaryKey": false,
"notNull": true
},
"rows_written": {
"name": "rows_written",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"performed_by": {
"name": "performed_by",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"performed_at": {
"name": "performed_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {
"category_change_event_retailer_org_id_organization_id_fk": {
"name": "category_change_event_retailer_org_id_organization_id_fk",
"tableFrom": "category_change_event",
"tableTo": "organization",
"columnsFrom": [
"retailer_org_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.eligibility": {
"name": "eligibility",
"schema": "",
"columns": {
"retailer_org_id": {
"name": "retailer_org_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"vendor_org_id": {
"name": "vendor_org_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"local_category_id": {
"name": "local_category_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"provenance": {
"name": "provenance",
"type": "grant_provenance",
"typeSchema": "public",
"primaryKey": false,
"notNull": true,
"default": "'manual'"
},
"provenance_event_id": {
"name": "provenance_event_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"granted_at": {
"name": "granted_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"revoked_at": {
"name": "revoked_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"eligibility_retailer_org_id_organization_id_fk": {
"name": "eligibility_retailer_org_id_organization_id_fk",
"tableFrom": "eligibility",
"tableTo": "organization",
"columnsFrom": [
"retailer_org_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"eligibility_vendor_org_id_organization_id_fk": {
"name": "eligibility_vendor_org_id_organization_id_fk",
"tableFrom": "eligibility",
"tableTo": "organization",
"columnsFrom": [
"vendor_org_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"eligibility_local_category_id_local_category_id_fk": {
"name": "eligibility_local_category_id_local_category_id_fk",
"tableFrom": "eligibility",
"tableTo": "local_category",
"columnsFrom": [
"local_category_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {
"eligibility_retailer_org_id_vendor_org_id_local_category_id_pk": {
"name": "eligibility_retailer_org_id_vendor_org_id_local_category_id_pk",
"columns": [
"retailer_org_id",
"vendor_org_id",
"local_category_id"
]
}
},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.local_category": {
"name": "local_category",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"retailer_org_id": {
"name": "retailer_org_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"label": {
"name": "label",
"type": "text",
"primaryKey": false,
"notNull": true
},
"spine_leaf_id": {
"name": "spine_leaf_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"valid_from": {
"name": "valid_from",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"valid_to": {
"name": "valid_to",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"superseded_by": {
"name": "superseded_by",
"type": "uuid[]",
"primaryKey": false,
"notNull": true,
"default": "'{}'"
}
},
"indexes": {},
"foreignKeys": {
"local_category_retailer_org_id_organization_id_fk": {
"name": "local_category_retailer_org_id_organization_id_fk",
"tableFrom": "local_category",
"tableTo": "organization",
"columnsFrom": [
"retailer_org_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"local_category_spine_leaf_id_spine_node_id_fk": {
"name": "local_category_spine_leaf_id_spine_node_id_fk",
"tableFrom": "local_category",
"tableTo": "spine_node",
"columnsFrom": [
"spine_leaf_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.spine_node": {
"name": "spine_node",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"label": {
"name": "label",
"type": "text",
"primaryKey": false,
"notNull": true
},
"group_id": {
"name": "group_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"unspsc_families": {
"name": "unspsc_families",
"type": "text[]",
"primaryKey": false,
"notNull": true,
"default": "'{}'"
},
"valid_from": {
"name": "valid_from",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"valid_to": {
"name": "valid_to",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"superseded_by": {
"name": "superseded_by",
"type": "uuid[]",
"primaryKey": false,
"notNull": true,
"default": "'{}'"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.criterion": {
"name": "criterion",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"solicitation_id": {
"name": "solicitation_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"parent_id": {
"name": "parent_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"label": {
"name": "label",
"type": "text",
"primaryKey": false,
"notNull": true
},
"max_points": {
"name": "max_points",
"type": "numeric(8, 2)",
"primaryKey": false,
"notNull": true
},
"weight": {
"name": "weight",
"type": "numeric(8, 2)",
"primaryKey": false,
"notNull": true
},
"scale_anchors": {
"name": "scale_anchors",
"type": "jsonb",
"primaryKey": false,
"notNull": true,
"default": "'[]'::jsonb"
}
},
"indexes": {},
"foreignKeys": {
"criterion_solicitation_id_solicitation_id_fk": {
"name": "criterion_solicitation_id_solicitation_id_fk",
"tableFrom": "criterion",
"tableTo": "solicitation",
"columnsFrom": [
"solicitation_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"criterion_parent_id_criterion_id_fk": {
"name": "criterion_parent_id_criterion_id_fk",
"tableFrom": "criterion",
"tableTo": "criterion",
"columnsFrom": [
"parent_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": true
},
"public.criterion_requirement": {
"name": "criterion_requirement",
"schema": "",
"columns": {
"criterion_id": {
"name": "criterion_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"requirement_id": {
"name": "requirement_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"authored_by": {
"name": "authored_by",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"frozen_at": {
"name": "frozen_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"criterion_requirement_criterion_id_criterion_id_fk": {
"name": "criterion_requirement_criterion_id_criterion_id_fk",
"tableFrom": "criterion_requirement",
"tableTo": "criterion",
"columnsFrom": [
"criterion_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"criterion_requirement_requirement_id_requirement_id_fk": {
"name": "criterion_requirement_requirement_id_requirement_id_fk",
"tableFrom": "criterion_requirement",
"tableTo": "requirement",
"columnsFrom": [
"requirement_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {
"criterion_requirement_criterion_id_requirement_id_pk": {
"name": "criterion_requirement_criterion_id_requirement_id_pk",
"columns": [
"criterion_id",
"requirement_id"
]
}
},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": true
},
"public.evaluation_scenario": {
"name": "evaluation_scenario",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"solicitation_id": {
"name": "solicitation_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"declared_at": {
"name": "declared_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"monthly_weights": {
"name": "monthly_weights",
"type": "integer[]",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"evaluation_scenario_solicitation_id_solicitation_id_fk": {
"name": "evaluation_scenario_solicitation_id_solicitation_id_fk",
"tableFrom": "evaluation_scenario",
"tableTo": "solicitation",
"columnsFrom": [
"solicitation_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.price_line": {
"name": "price_line",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"solicitation_id": {
"name": "solicitation_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"label": {
"name": "label",
"type": "text",
"primaryKey": false,
"notNull": true
},
"unit": {
"name": "unit",
"type": "text",
"primaryKey": false,
"notNull": true
},
"required": {
"name": "required",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": true
}
},
"indexes": {},
"foreignKeys": {
"price_line_solicitation_id_solicitation_id_fk": {
"name": "price_line_solicitation_id_solicitation_id_fk",
"tableFrom": "price_line",
"tableTo": "solicitation",
"columnsFrom": [
"solicitation_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.requirement": {
"name": "requirement",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"solicitation_id": {
"name": "solicitation_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"ordinal": {
"name": "ordinal",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"kind": {
"name": "kind",
"type": "requirement_kind",
"typeSchema": "public",
"primaryKey": false,
"notNull": true
},
"text": {
"name": "text",
"type": "text",
"primaryKey": false,
"notNull": true
},
"response_obligation": {
"name": "response_obligation",
"type": "text",
"primaryKey": false,
"notNull": false
},
"provenance_document_id": {
"name": "provenance_document_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"provenance_page": {
"name": "provenance_page",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"provenance_span": {
"name": "provenance_span",
"type": "jsonb",
"primaryKey": false,
"notNull": false
},
"determinable_from_response": {
"name": "determinable_from_response",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": true
},
"confirmation_state": {
"name": "confirmation_state",
"type": "confirmation_state",
"typeSchema": "public",
"primaryKey": false,
"notNull": true,
"default": "'unconfirmed'"
},
"confirmed_by": {
"name": "confirmed_by",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"confirmed_at": {
"name": "confirmed_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"requirement_solicitation_id_solicitation_id_fk": {
"name": "requirement_solicitation_id_solicitation_id_fk",
"tableFrom": "requirement",
"tableTo": "solicitation",
"columnsFrom": [
"solicitation_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"requirement_provenance_document_id_solicitation_document_id_fk": {
"name": "requirement_provenance_document_id_solicitation_document_id_fk",
"tableFrom": "requirement",
"tableTo": "solicitation_document",
"columnsFrom": [
"provenance_document_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": true
},
"public.scenario_quantity": {
"name": "scenario_quantity",
"schema": "",
"columns": {
"scenario_id": {
"name": "scenario_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"price_line_id": {
"name": "price_line_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"quantity": {
"name": "quantity",
"type": "numeric(14, 3)",
"primaryKey": false,
"notNull": true
}
},
"indexes": {},
"foreignKeys": {
"scenario_quantity_scenario_id_evaluation_scenario_id_fk": {
"name": "scenario_quantity_scenario_id_evaluation_scenario_id_fk",
"tableFrom": "scenario_quantity",
"tableTo": "evaluation_scenario",
"columnsFrom": [
"scenario_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"scenario_quantity_price_line_id_price_line_id_fk": {
"name": "scenario_quantity_price_line_id_price_line_id_fk",
"tableFrom": "scenario_quantity",
"tableTo": "price_line",
"columnsFrom": [
"price_line_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {
"scenario_quantity_scenario_id_price_line_id_pk": {
"name": "scenario_quantity_scenario_id_price_line_id_pk",
"columns": [
"scenario_id",
"price_line_id"
]
}
},
"uniqueConstraints": {},
"policies": {
"scenario_quantity_read": {
"name": "scenario_quantity_read",
"as": "PERMISSIVE",
"for": "SELECT",
"to": [
"public"
],
"using": "class_released(release_level_for_solicitation(\n (SELECT solicitation_id FROM evaluation_scenario WHERE id = scenario_id)\n ), 'scenario_quantity')"
}
},
"checkConstraints": {},
"isRLSEnabled": true
},
"public.scenario_variable": {
"name": "scenario_variable",
"schema": "",
"columns": {
"scenario_id": {
"name": "scenario_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"name": {
"name": "name",
"type": "scenario_variable_name",
"typeSchema": "public",
"primaryKey": false,
"notNull": true
},
"value": {
"name": "value",
"type": "numeric(14, 3)",
"primaryKey": false,
"notNull": true
}
},
"indexes": {},
"foreignKeys": {
"scenario_variable_scenario_id_evaluation_scenario_id_fk": {
"name": "scenario_variable_scenario_id_evaluation_scenario_id_fk",
"tableFrom": "scenario_variable",
"tableTo": "evaluation_scenario",
"columnsFrom": [
"scenario_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {
"scenario_variable_scenario_id_name_pk": {
"name": "scenario_variable_scenario_id_name_pk",
"columns": [
"scenario_id",
"name"
]
}
},
"uniqueConstraints": {},
"policies": {
"scenario_variable_read": {
"name": "scenario_variable_read",
"as": "PERMISSIVE",
"for": "SELECT",
"to": [
"public"
],
"using": "class_released(release_level_for_solicitation(\n (SELECT solicitation_id FROM evaluation_scenario WHERE id = scenario_id)\n ), 'scenario_quantity')"
}
},
"checkConstraints": {},
"isRLSEnabled": true
},
"public.solicitation": {
"name": "solicitation",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"issuer_org_id": {
"name": "issuer_org_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"local_category_id": {
"name": "local_category_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"title": {
"name": "title",
"type": "text",
"primaryKey": false,
"notNull": true
},
"stage": {
"name": "stage",
"type": "solicitation_stage",
"typeSchema": "public",
"primaryKey": false,
"notNull": true,
"default": "'draft'"
},
"issued_at": {
"name": "issued_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"responses_due_at": {
"name": "responses_due_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"acknowledgement_required": {
"name": "acknowledgement_required",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"volume_band": {
"name": "volume_band",
"type": "text",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"solicitation_issuer_org_id_organization_id_fk": {
"name": "solicitation_issuer_org_id_organization_id_fk",
"tableFrom": "solicitation",
"tableTo": "organization",
"columnsFrom": [
"issuer_org_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"solicitation_local_category_id_local_category_id_fk": {
"name": "solicitation_local_category_id_local_category_id_fk",
"tableFrom": "solicitation",
"tableTo": "local_category",
"columnsFrom": [
"local_category_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": true
},
"public.solicitation_amendment": {
"name": "solicitation_amendment",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"solicitation_id": {
"name": "solicitation_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"class": {
"name": "class",
"type": "amendment_class",
"typeSchema": "public",
"primaryKey": false,
"notNull": true
},
"summary": {
"name": "summary",
"type": "text",
"primaryKey": false,
"notNull": true
},
"requirement_ids": {
"name": "requirement_ids",
"type": "uuid[]",
"primaryKey": false,
"notNull": true,
"default": "'{}'"
},
"deadline_extended_to": {
"name": "deadline_extended_to",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"authored_by": {
"name": "authored_by",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"authored_at": {
"name": "authored_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {
"solicitation_amendment_solicitation_id_solicitation_id_fk": {
"name": "solicitation_amendment_solicitation_id_solicitation_id_fk",
"tableFrom": "solicitation_amendment",
"tableTo": "solicitation",
"columnsFrom": [
"solicitation_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.solicitation_document": {
"name": "solicitation_document",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"solicitation_id": {
"name": "solicitation_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"kind": {
"name": "kind",
"type": "text",
"primaryKey": false,
"notNull": true
},
"blob_ref": {
"name": "blob_ref",
"type": "text",
"primaryKey": false,
"notNull": true
},
"sha256": {
"name": "sha256",
"type": "text",
"primaryKey": false,
"notNull": true
}
},
"indexes": {},
"foreignKeys": {
"solicitation_document_solicitation_id_solicitation_id_fk": {
"name": "solicitation_document_solicitation_id_solicitation_id_fk",
"tableFrom": "solicitation_document",
"tableTo": "solicitation",
"columnsFrom": [
"solicitation_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": true
},
"public.answer": {
"name": "answer",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"response_id": {
"name": "response_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"requirement_id": {
"name": "requirement_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"coverage": {
"name": "coverage",
"type": "coverage",
"typeSchema": "public",
"primaryKey": false,
"notNull": true
},
"text": {
"name": "text",
"type": "text",
"primaryKey": false,
"notNull": false
},
"provenance_document_id": {
"name": "provenance_document_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"provenance_page": {
"name": "provenance_page",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"provenance_span": {
"name": "provenance_span",
"type": "jsonb",
"primaryKey": false,
"notNull": false
},
"vendor_attested": {
"name": "vendor_attested",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"reopened_by_amendment_id": {
"name": "reopened_by_amendment_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"answer_response_id_response_id_fk": {
"name": "answer_response_id_response_id_fk",
"tableFrom": "answer",
"tableTo": "response",
"columnsFrom": [
"response_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"answer_requirement_id_requirement_id_fk": {
"name": "answer_requirement_id_requirement_id_fk",
"tableFrom": "answer",
"tableTo": "requirement",
"columnsFrom": [
"requirement_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"answer_provenance_document_id_response_document_id_fk": {
"name": "answer_provenance_document_id_response_document_id_fk",
"tableFrom": "answer",
"tableTo": "response_document",
"columnsFrom": [
"provenance_document_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {
"answer_read": {
"name": "answer_read",
"as": "PERMISSIVE",
"for": "SELECT",
"to": [
"public"
],
"using": "class_released(release_level_for_response(response_id), 'answer_text')"
}
},
"checkConstraints": {},
"isRLSEnabled": true
},
"public.derived_cost": {
"name": "derived_cost",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"response_id": {
"name": "response_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"scenario_id": {
"name": "scenario_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"amount": {
"name": "amount",
"type": "numeric(16, 2)",
"primaryKey": false,
"notNull": false
},
"reason": {
"name": "reason",
"type": "unpriced_reason",
"typeSchema": "public",
"primaryKey": false,
"notNull": false
},
"amount_if_declined": {
"name": "amount_if_declined",
"type": "numeric(16, 2)",
"primaryKey": false,
"notNull": false
},
"reason_if_declined": {
"name": "reason_if_declined",
"type": "unpriced_reason",
"typeSchema": "public",
"primaryKey": false,
"notNull": false
},
"breakdown": {
"name": "breakdown",
"type": "jsonb",
"primaryKey": false,
"notNull": true
},
"evaluator_version": {
"name": "evaluator_version",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"inputs_hash": {
"name": "inputs_hash",
"type": "text",
"primaryKey": false,
"notNull": true
},
"voided_by_amendment_id": {
"name": "voided_by_amendment_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"computed_at": {
"name": "computed_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {
"derived_cost_response_id_response_id_fk": {
"name": "derived_cost_response_id_response_id_fk",
"tableFrom": "derived_cost",
"tableTo": "response",
"columnsFrom": [
"response_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"derived_cost_scenario_id_evaluation_scenario_id_fk": {
"name": "derived_cost_scenario_id_evaluation_scenario_id_fk",
"tableFrom": "derived_cost",
"tableTo": "evaluation_scenario",
"columnsFrom": [
"scenario_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {
"derived_cost_read": {
"name": "derived_cost_read",
"as": "PERMISSIVE",
"for": "SELECT",
"to": [
"public"
],
"using": "class_released(release_level_for_response(response_id), 'derived_cost')"
}
},
"checkConstraints": {},
"isRLSEnabled": true
},
"public.exception": {
"name": "exception",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"response_id": {
"name": "response_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"requirement_id": {
"name": "requirement_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"target_section": {
"name": "target_section",
"type": "text",
"primaryKey": false,
"notNull": false
},
"text": {
"name": "text",
"type": "text",
"primaryKey": false,
"notNull": true
},
"labelled": {
"name": "labelled",
"type": "boolean",
"primaryKey": false,
"notNull": true
},
"consequence": {
"name": "consequence",
"type": "exception_consequence",
"typeSchema": "public",
"primaryKey": false,
"notNull": true
},
"amount_if_declined": {
"name": "amount_if_declined",
"type": "numeric(14, 2)",
"primaryKey": false,
"notNull": false
},
"price_delta": {
"name": "price_delta",
"type": "numeric(14, 2)",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"exception_response_id_response_id_fk": {
"name": "exception_response_id_response_id_fk",
"tableFrom": "exception",
"tableTo": "response",
"columnsFrom": [
"response_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"exception_requirement_id_requirement_id_fk": {
"name": "exception_requirement_id_requirement_id_fk",
"tableFrom": "exception",
"tableTo": "requirement",
"columnsFrom": [
"requirement_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {
"exception_read": {
"name": "exception_read",
"as": "PERMISSIVE",
"for": "SELECT",
"to": [
"public"
],
"using": "class_released(release_level_for_response(response_id), 'exception_text')"
}
},
"checkConstraints": {},
"isRLSEnabled": true
},
"public.participation": {
"name": "participation",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"solicitation_id": {
"name": "solicitation_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"vendor_org_id": {
"name": "vendor_org_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"state": {
"name": "state",
"type": "participation_state",
"typeSchema": "public",
"primaryKey": false,
"notNull": true,
"default": "'invited'"
},
"acknowledged_at": {
"name": "acknowledged_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"participation_solicitation_id_solicitation_id_fk": {
"name": "participation_solicitation_id_solicitation_id_fk",
"tableFrom": "participation",
"tableTo": "solicitation",
"columnsFrom": [
"solicitation_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"participation_vendor_org_id_organization_id_fk": {
"name": "participation_vendor_org_id_organization_id_fk",
"tableFrom": "participation",
"tableTo": "organization",
"columnsFrom": [
"vendor_org_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": true
},
"public.price_quote": {
"name": "price_quote",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"response_id": {
"name": "response_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"price_line_id": {
"name": "price_line_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"rate_structure": {
"name": "rate_structure",
"type": "jsonb",
"primaryKey": false,
"notNull": true
},
"attachment_document_id": {
"name": "attachment_document_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"price_quote_response_id_response_id_fk": {
"name": "price_quote_response_id_response_id_fk",
"tableFrom": "price_quote",
"tableTo": "response",
"columnsFrom": [
"response_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"price_quote_price_line_id_price_line_id_fk": {
"name": "price_quote_price_line_id_price_line_id_fk",
"tableFrom": "price_quote",
"tableTo": "price_line",
"columnsFrom": [
"price_line_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"price_quote_attachment_document_id_response_document_id_fk": {
"name": "price_quote_attachment_document_id_response_document_id_fk",
"tableFrom": "price_quote",
"tableTo": "response_document",
"columnsFrom": [
"attachment_document_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {
"price_quote_read": {
"name": "price_quote_read",
"as": "PERMISSIVE",
"for": "SELECT",
"to": [
"public"
],
"using": "class_released(release_level_for_response(response_id), 'price_quote')"
}
},
"checkConstraints": {},
"isRLSEnabled": true
},
"public.response": {
"name": "response",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"solicitation_id": {
"name": "solicitation_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"vendor_org_id": {
"name": "vendor_org_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"submitted_at": {
"name": "submitted_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"attested_by": {
"name": "attested_by",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"attested_at": {
"name": "attested_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"response_solicitation_id_solicitation_id_fk": {
"name": "response_solicitation_id_solicitation_id_fk",
"tableFrom": "response",
"tableTo": "solicitation",
"columnsFrom": [
"solicitation_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"response_vendor_org_id_organization_id_fk": {
"name": "response_vendor_org_id_organization_id_fk",
"tableFrom": "response",
"tableTo": "organization",
"columnsFrom": [
"vendor_org_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": true
},
"public.response_document": {
"name": "response_document",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"response_id": {
"name": "response_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"blob_ref": {
"name": "blob_ref",
"type": "text",
"primaryKey": false,
"notNull": true
},
"sha256": {
"name": "sha256",
"type": "text",
"primaryKey": false,
"notNull": true
}
},
"indexes": {},
"foreignKeys": {
"response_document_response_id_response_id_fk": {
"name": "response_document_response_id_response_id_fk",
"tableFrom": "response_document",
"tableTo": "response",
"columnsFrom": [
"response_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": true
},
"public.gate_result": {
"name": "gate_result",
"schema": "",
"columns": {
"response_id": {
"name": "response_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"requirement_id": {
"name": "requirement_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"passed": {
"name": "passed",
"type": "boolean",
"primaryKey": false,
"notNull": true
},
"computed_at": {
"name": "computed_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {
"gate_result_response_id_response_id_fk": {
"name": "gate_result_response_id_response_id_fk",
"tableFrom": "gate_result",
"tableTo": "response",
"columnsFrom": [
"response_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"gate_result_requirement_id_requirement_id_fk": {
"name": "gate_result_requirement_id_requirement_id_fk",
"tableFrom": "gate_result",
"tableTo": "requirement",
"columnsFrom": [
"requirement_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": true
},
"public.rubric_amendment": {
"name": "rubric_amendment",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"solicitation_id": {
"name": "solicitation_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"reason": {
"name": "reason",
"type": "text",
"primaryKey": false,
"notNull": true
},
"voided_score_ids": {
"name": "voided_score_ids",
"type": "uuid[]",
"primaryKey": false,
"notNull": true,
"default": "'{}'"
},
"authored_by": {
"name": "authored_by",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"authored_at": {
"name": "authored_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.score": {
"name": "score",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"response_id": {
"name": "response_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"criterion_id": {
"name": "criterion_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"points": {
"name": "points",
"type": "numeric(8, 2)",
"primaryKey": false,
"notNull": true
},
"committed_by": {
"name": "committed_by",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"committed_at": {
"name": "committed_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"derived_from_suggestion_id": {
"name": "derived_from_suggestion_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"voided_by_amendment_id": {
"name": "voided_by_amendment_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"score_response_id_response_id_fk": {
"name": "score_response_id_response_id_fk",
"tableFrom": "score",
"tableTo": "response",
"columnsFrom": [
"response_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"score_criterion_id_criterion_id_fk": {
"name": "score_criterion_id_criterion_id_fk",
"tableFrom": "score",
"tableTo": "criterion",
"columnsFrom": [
"criterion_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"score_derived_from_suggestion_id_suggestion_id_fk": {
"name": "score_derived_from_suggestion_id_suggestion_id_fk",
"tableFrom": "score",
"tableTo": "suggestion",
"columnsFrom": [
"derived_from_suggestion_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {
"score_read": {
"name": "score_read",
"as": "PERMISSIVE",
"for": "SELECT",
"to": [
"public"
],
"using": "class_released(release_level_for_response(response_id), 'own_scoring')"
}
},
"checkConstraints": {},
"isRLSEnabled": true
},
"public.suggestion": {
"name": "suggestion",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"response_id": {
"name": "response_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"criterion_id": {
"name": "criterion_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"proposed_points": {
"name": "proposed_points",
"type": "numeric(8, 2)",
"primaryKey": false,
"notNull": false
},
"anchor_matched": {
"name": "anchor_matched",
"type": "text",
"primaryKey": false,
"notNull": false
},
"citations": {
"name": "citations",
"type": "jsonb",
"primaryKey": false,
"notNull": true,
"default": "'[]'::jsonb"
},
"confidence": {
"name": "confidence",
"type": "numeric(4, 3)",
"primaryKey": false,
"notNull": false
},
"model_version": {
"name": "model_version",
"type": "text",
"primaryKey": false,
"notNull": true
},
"no_evidence_found": {
"name": "no_evidence_found",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {
"suggestion_response_id_response_id_fk": {
"name": "suggestion_response_id_response_id_fk",
"tableFrom": "suggestion",
"tableTo": "response",
"columnsFrom": [
"response_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"suggestion_criterion_id_criterion_id_fk": {
"name": "suggestion_criterion_id_criterion_id_fk",
"tableFrom": "suggestion",
"tableTo": "criterion",
"columnsFrom": [
"criterion_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": true
},
"public.export_event": {
"name": "export_event",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"actor_id": {
"name": "actor_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"org_id": {
"name": "org_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"capability": {
"name": "capability",
"type": "text",
"primaryKey": false,
"notNull": true
},
"solicitation_id": {
"name": "solicitation_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"classes": {
"name": "classes",
"type": "text[]",
"primaryKey": false,
"notNull": true
},
"row_count": {
"name": "row_count",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"at": {
"name": "at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.release_matrix": {
"name": "release_matrix",
"schema": "",
"columns": {
"version": {
"name": "version",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"class": {
"name": "class",
"type": "disclosure_class",
"typeSchema": "public",
"primaryKey": false,
"notNull": true
},
"level": {
"name": "level",
"type": "release_level",
"typeSchema": "public",
"primaryKey": false,
"notNull": true
},
"released": {
"name": "released",
"type": "text",
"primaryKey": false,
"notNull": true
},
"effective_from": {
"name": "effective_from",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {
"release_matrix_version_class_level_pk": {
"name": "release_matrix_version_class_level_pk",
"columns": [
"version",
"class",
"level"
]
}
},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.document_type": {
"name": "document_type",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true
},
"label": {
"name": "label",
"type": "text",
"primaryKey": false,
"notNull": true
},
"expiry_rule": {
"name": "expiry_rule",
"type": "text",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.retailer_acceptance": {
"name": "retailer_acceptance",
"schema": "",
"columns": {
"document_id": {
"name": "document_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"retailer_org_id": {
"name": "retailer_org_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"accepted_at": {
"name": "accepted_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"vendor_disclosed_name": {
"name": "vendor_disclosed_name",
"type": "text",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"retailer_acceptance_document_id_vault_document_id_fk": {
"name": "retailer_acceptance_document_id_vault_document_id_fk",
"tableFrom": "retailer_acceptance",
"tableTo": "vault_document",
"columnsFrom": [
"document_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"retailer_acceptance_retailer_org_id_organization_id_fk": {
"name": "retailer_acceptance_retailer_org_id_organization_id_fk",
"tableFrom": "retailer_acceptance",
"tableTo": "organization",
"columnsFrom": [
"retailer_org_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {
"retailer_acceptance_document_id_retailer_org_id_pk": {
"name": "retailer_acceptance_document_id_retailer_org_id_pk",
"columns": [
"document_id",
"retailer_org_id"
]
}
},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": true
},
"public.vault_document": {
"name": "vault_document",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"vendor_org_id": {
"name": "vendor_org_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"type_id": {
"name": "type_id",
"type": "text",
"primaryKey": false,
"notNull": true
},
"blob_ref": {
"name": "blob_ref",
"type": "text",
"primaryKey": false,
"notNull": true
},
"sha256": {
"name": "sha256",
"type": "text",
"primaryKey": false,
"notNull": true
},
"expires_at": {
"name": "expires_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"expiry_state": {
"name": "expiry_state",
"type": "expiry_state",
"typeSchema": "public",
"primaryKey": false,
"notNull": true,
"default": "'current'"
},
"expiry_computed_at": {
"name": "expiry_computed_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"vault_document_vendor_org_id_organization_id_fk": {
"name": "vault_document_vendor_org_id_organization_id_fk",
"tableFrom": "vault_document",
"tableTo": "organization",
"columnsFrom": [
"vendor_org_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"vault_document_type_id_document_type_id_fk": {
"name": "vault_document_type_id_document_type_id_fk",
"tableFrom": "vault_document",
"tableTo": "document_type",
"columnsFrom": [
"type_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": true
},
"public.entitlement": {
"name": "entitlement",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"beneficiary_org_id": {
"name": "beneficiary_org_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"payer_org_id": {
"name": "payer_org_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"tier": {
"name": "tier",
"type": "tier",
"typeSchema": "public",
"primaryKey": false,
"notNull": true
},
"seats": {
"name": "seats",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"started_at": {
"name": "started_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"lapsed_at": {
"name": "lapsed_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"entitlement_beneficiary_org_id_organization_id_fk": {
"name": "entitlement_beneficiary_org_id_organization_id_fk",
"tableFrom": "entitlement",
"tableTo": "organization",
"columnsFrom": [
"beneficiary_org_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"entitlement_payer_org_id_organization_id_fk": {
"name": "entitlement_payer_org_id_organization_id_fk",
"tableFrom": "entitlement",
"tableTo": "organization",
"columnsFrom": [
"payer_org_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.confirmation_event": {
"name": "confirmation_event",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"requirement_id": {
"name": "requirement_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"confirmed_by": {
"name": "confirmed_by",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"corrected": {
"name": "corrected",
"type": "text",
"primaryKey": false,
"notNull": false
},
"at": {
"name": "at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {
"confirmation_event_requirement_id_requirement_id_fk": {
"name": "confirmation_event_requirement_id_requirement_id_fk",
"tableFrom": "confirmation_event",
"tableTo": "requirement",
"columnsFrom": [
"requirement_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.sweep_finding": {
"name": "sweep_finding",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"solicitation_id": {
"name": "solicitation_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"document_id": {
"name": "document_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"kind": {
"name": "kind",
"type": "sweep_finding_kind",
"typeSchema": "public",
"primaryKey": false,
"notNull": true
},
"page": {
"name": "page",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"span": {
"name": "span",
"type": "jsonb",
"primaryKey": false,
"notNull": true
},
"quoted_text": {
"name": "quoted_text",
"type": "text",
"primaryKey": false,
"notNull": true
},
"resolved_by_requirement_id": {
"name": "resolved_by_requirement_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"dismissed_by": {
"name": "dismissed_by",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"dismissed_at": {
"name": "dismissed_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"sweep_finding_solicitation_id_solicitation_id_fk": {
"name": "sweep_finding_solicitation_id_solicitation_id_fk",
"tableFrom": "sweep_finding",
"tableTo": "solicitation",
"columnsFrom": [
"solicitation_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"sweep_finding_document_id_solicitation_document_id_fk": {
"name": "sweep_finding_document_id_solicitation_document_id_fk",
"tableFrom": "sweep_finding",
"tableTo": "solicitation_document",
"columnsFrom": [
"document_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"sweep_finding_resolved_by_requirement_id_requirement_id_fk": {
"name": "sweep_finding_resolved_by_requirement_id_requirement_id_fk",
"tableFrom": "sweep_finding",
"tableTo": "requirement",
"columnsFrom": [
"resolved_by_requirement_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.vendor_omission_report": {
"name": "vendor_omission_report",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"solicitation_id": {
"name": "solicitation_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"vendor_org_id": {
"name": "vendor_org_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"body": {
"name": "body",
"type": "text",
"primaryKey": false,
"notNull": true
},
"reported_at": {
"name": "reported_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"acted_on_at": {
"name": "acted_on_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"acted_on_by": {
"name": "acted_on_by",
"type": "uuid",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"vendor_omission_report_solicitation_id_solicitation_id_fk": {
"name": "vendor_omission_report_solicitation_id_solicitation_id_fk",
"tableFrom": "vendor_omission_report",
"tableTo": "solicitation",
"columnsFrom": [
"solicitation_id"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
}
},
"enums": {
"public.capability": {
"name": "capability",
"schema": "public",
"values": [
"issuer",
"vendor"
]
},
"public.category_change_kind": {
"name": "category_change_kind",
"schema": "public",
"values": [
"split",
"merge",
"retire",
"remap"
]
},
"public.grant_provenance": {
"name": "grant_provenance",
"schema": "public",
"values": [
"manual",
"split_event",
"merge_event"
]
},
"public.amendment_class": {
"name": "amendment_class",
"schema": "public",
"values": [
"substantive",
"clarification"
]
},
"public.confirmation_state": {
"name": "confirmation_state",
"schema": "public",
"values": [
"unconfirmed",
"confirmed",
"corrected"
]
},
"public.requirement_kind": {
"name": "requirement_kind",
"schema": "public",
"values": [
"mandatory_gate",
"scored_criterion",
"certification_form",
"compliance_schedule",
"pricing",
"narrative"
]
},
"public.scenario_variable_name": {
"name": "scenario_variable_name",
"schema": "public",
"values": [
"siteCount",
"deliveriesPerWeek",
"instructionalWeeks"
]
},
"public.solicitation_stage": {
"name": "solicitation_stage",
"schema": "public",
"values": [
"draft",
"open",
"evaluating",
"finalists",
"awarded",
"cancelled"
]
},
"public.coverage": {
"name": "coverage",
"schema": "public",
"values": [
"answered",
"not_answered",
"indeterminate"
]
},
"public.exception_consequence": {
"name": "exception_consequence",
"schema": "public",
"values": [
"price_delta",
"withdrawal",
"unquantified"
]
},
"public.participation_state": {
"name": "participation_state",
"schema": "public",
"values": [
"invited",
"opened",
"acknowledged",
"intends_to_bid",
"submitted",
"withdrawn"
]
},
"public.unpriced_reason": {
"name": "unpriced_reason",
"schema": "public",
"values": [
"shape_unsupported",
"input_missing",
"line_incomplete",
"withdrawal_conditioned"
]
},
"public.disclosure_class": {
"name": "disclosure_class",
"schema": "public",
"values": [
"vendor_identity",
"participation_signal",
"scenario_quantity",
"answer_text",
"exception_text",
"price_quote",
"derived_cost",
"vault_document",
"own_scoring"
]
},
"public.release_level": {
"name": "release_level",
"schema": "public",
"values": [
"none",
"invited",
"acknowledged",
"submitted",
"open",
"evaluating",
"finalist",
"awarded"
]
},
"public.expiry_state": {
"name": "expiry_state",
"schema": "public",
"values": [
"current",
"expiring_soon",
"expired"
]
},
"public.tier": {
"name": "tier",
"schema": "public",
"values": [
"base",
"pro",
"enterprise"
]
},
"public.sweep_finding_kind": {
"name": "sweep_finding_kind",
"schema": "public",
"values": [
"asserted_obligation",
"uncovered_span"
]
}
},
"schemas": {},
"sequences": {},
"roles": {},
"policies": {},
"views": {},
"_meta": {
"columns": {},
"schemas": {},
"tables": {}
}
}