Skip to content
Community engagement

giveaways

Columns

ColumnTypeNullDefaultKeys
iduuid nogen_random_uuid()
PK
city_slugtext no—
sponsor_nametext no—
titletext no—
descriptiontext no—
prize_descriptiontext no—
cta_urltext no—
image_urltext yes—
terms_urltext yes—
starts_attimestamp no—
ends_attimestamp no—
statustext
activeendeddraft
no"active"
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

None.

Referenced by

Used by

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

REST & webhooks

  • ANY /mcp
  • ANY /mcp/public

Relations

Rendering diagram…

Diagram source
erDiagram
  giveaway_entries {
    uuid id PK
    uuid giveaway_id FK
    uuid dancer_id FK
  }
  giveaway_proposals {
    uuid id PK
    uuid event_id FK
    uuid proposed_by FK
    uuid profile_id FK
    uuid giveaway_id FK
    uuid decided_by FK
  }
  giveaways {
    uuid id PK
  }
  giveaways ||--o{ giveaway_entries : "giveaway_id"
  giveaways |o--o{ giveaway_proposals : "giveaway_id"

Defined at server/database/schema.ts:228 as giveaways.