Community engagement
giveaways
Columns
| Column | Type | Null | Default | Keys |
|---|---|---|---|---|
| id | uuid | no | gen_random_uuid() | PK |
| city_slug | text | no | — | |
| sponsor_name | text | no | — | |
| title | text | no | — | |
| description | text | no | — | |
| prize_description | text | no | — | |
| cta_url | text | no | — | |
| image_url | text | yes | — | |
| terms_url | text | yes | — | |
| starts_at | timestamp | no | — | |
| ends_at | timestamp | no | — | |
| status | text activeendeddraft | no | "active" | |
| 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.
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
- 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.