Venue booking & governance
booking_requests
Booking requests — connector model (no payment held). An organizer requests a date for a space; the venue responds. T&C accepted at request time.
Columns
| Column | Type | Null | Default | Keys |
|---|---|---|---|---|
| id | uuid | no | gen_random_uuid() | PK |
| space_id | uuid | no | — | |
| profile_id | uuid | no | — | |
| organizer_id | uuid | yes | — | |
| requester_id | uuid | yes | — | |
| requester_email | text | no | — | |
| requester_name | text | yes | — | |
| title | text | yes | — | |
| event_type | text | yes | — | |
| styles | json | yes | [] | |
| artists | json | yes | [] | |
| event_date | date | yes | — | |
| start_time | text | yes | — | |
| end_time | text | yes | — | |
| headcount | integer | yes | — | |
| message | text | yes | — | |
| ticket_url | text | yes | — | |
| terms_accepted_at | timestamp | yes | — | |
| status | text pendingaccepteddeclined | no | "pending" | |
| moderated_by_id | uuid | yes | — | |
| moderated_at | timestamp | yes | — | |
| moderation_note | text | yes | — | |
| notified_at | timestamp | yes | — | |
| created_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
No secondary indexes.
Foreign keys
- space_id → bookable_spaces.id on delete no action
- profile_id → profiles.id on delete no action
- organizer_id → profiles.id on delete no action
- requester_id → dancers.id on delete no action
- moderated_by_id → dancers.id on delete no action
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
REST & webhooks
- GET /api/event-status
- ANY /mcp
- ANY /mcp/public
Relations
Rendering diagram…
Diagram source
erDiagram
bookable_spaces {
uuid id PK
uuid profile_id FK
}
booking_requests {
uuid id PK
uuid space_id FK
uuid profile_id FK
uuid organizer_id FK
uuid requester_id FK
uuid moderated_by_id FK
}
dancers {
uuid id PK
text email UK
text neon_auth_id UK
text username UK
}
profiles {
uuid id PK
text username UK
}
profiles ||--o{ bookable_spaces : "profile_id"
bookable_spaces ||--o{ booking_requests : "space_id"
profiles ||--o{ booking_requests : "profile_id"
profiles |o--o{ booking_requests : "organizer_id"
dancers |o--o{ booking_requests : "requester_id"
dancers |o--o{ booking_requests : "moderated_by_id" Defined at server/database/schema.ts:492 as bookingRequests.