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
| Column | Type | Null | Default | Keys |
|---|---|---|---|---|
| id | uuid | no | gen_random_uuid() | PK |
| kind | text event_inquiryproblem_reportgig_applicationcontact | no | — | |
| status | text newtriagedin_progressansweredclosedspam | no | "new" | |
| dancer_id | uuid | yes | — | |
| text | yes | — | ||
| name | text | yes | — | |
| event_id | uuid | yes | — | |
| profile_id | uuid | yes | — | |
| gig_id | uuid | yes | — | |
| payload | jsonb | no | {} | |
| created_at | timestamp | no | now() | |
| updated_at | timestamp | yes | now() |
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
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.