Skip to content
Venue booking & governance

inbound_requests

Inbound requests (ADR-010, Step 16). Every public-facing request — event enquiries, problem reports, gig applications, general contact — is stored here first, then delivered to Linear / email by the delivery outbox.

Columns

ColumnTypeNullDefaultKeys
iduuid nogen_random_uuid()
PK
kindtext
event_inquiryproblem_reportgig_applicationcontact
no—
statustext
newtriagedin_progressansweredclosedspam
no"new"
dancer_iduuid yes—
emailtext yes—
nametext yes—
event_iduuid yes—
profile_iduuid yes—
gig_iduuid yes—
payloadjsonb no{}
created_attimestamp nonow()
updated_attimestamp yesnow()

Value lists come from .$type<'a' | 'b'>() in the schema — enforced in TypeScript only, not by the database.

Keys, constraints & indexes

Unique

None besides the primary key.

Indexes

  • (kind, status)
    inbound_requests_kind_status_idx
  • (profile_id)
    inbound_requests_profile_idx
  • (created_at)
    inbound_requests_created_idx

Foreign keys

  • dancer_id → dancers.id
    on delete set null
  • event_id → events.id
    on delete set null
  • profile_id → profiles.id
    on delete set null
  • gig_id → gigs.id
    on delete set null

Used by

Code that reads or writes this table, found by static analysis of the tRPC routers and API handlers (including helpers they call).

tRPC procedures

No public or signed-in procedure.

REST & webhooks

None.

Relations

Rendering diagram…

Diagram source
erDiagram
  dancers {
    uuid id PK
    text email UK
    text neon_auth_id UK
    text username UK
  }
  events {
    uuid id PK
    uuid host_profile_id FK
    uuid edited_by FK
  }
  gigs {
    uuid id PK
    uuid dancer_id FK
    uuid poster_profile_id FK
  }
  inbound_requests {
    uuid id PK
    uuid dancer_id FK
    uuid event_id FK
    uuid profile_id FK
    uuid gig_id FK
  }
  profiles {
    uuid id PK
    text username UK
  }
  profiles |o--o{ events : "host_profile_id"
  dancers |o--o{ events : "edited_by"
  dancers |o--o{ gigs : "dancer_id"
  profiles |o--o{ gigs : "poster_profile_id"
  dancers |o--o{ inbound_requests : "dancer_id"
  events |o--o{ inbound_requests : "event_id"
  profiles |o--o{ inbound_requests : "profile_id"
  gigs |o--o{ inbound_requests : "gig_id"

Defined at server/database/schema.ts:1224 as inboundRequests.