Skip to content
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

ColumnTypeNullDefaultKeys
iduuid nogen_random_uuid()
PK
space_iduuid no—
profile_iduuid no—
organizer_iduuid yes—
requester_iduuid yes—
requester_emailtext no—
requester_nametext yes—
titletext yes—
event_typetext yes—
stylesjson yes[]
artistsjson yes[]
event_datedate yes—
start_timetext yes—
end_timetext yes—
headcountinteger yes—
messagetext yes—
ticket_urltext yes—
terms_accepted_attimestamp yes—
statustext
pendingaccepteddeclined
no"pending"
moderated_by_iduuid yes—
moderated_attimestamp yes—
moderation_notetext yes—
notified_attimestamp yes—
created_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

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).

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.