Overview
Events are the core entity in EventPalour. Each event belongs to a workspace and can be configured as online, physical, or hybrid with various status states and pricing models.Event Schema
Theevents table contains comprehensive event information:
| Field | Type | Description |
|---|---|---|
id | varchar(16) | Unique event identifier |
short_id | varchar(6) | 6-character short ID for URLs (unique) |
title | varchar(255) | Event title |
description | text | Full event description |
workspace_id | varchar(16) | Owner workspace (foreign key) |
category_id | varchar(16) | Event category (foreign key) |
status | event_status_enum | Current status (default: “active”) |
type | event_type_enum | Event type (default: “physical”) |
pricing | event_pricing_enum | Pricing model (default: “free”) |
venue | text | Physical location details |
country | text | Country |
city | text | City |
online_link | text | Meeting link for online/hybrid events |
queue_counter | integer | Waitlist counter (default: 0) |
start_date | timestamp | Event start time (with timezone) |
end_date | timestamp | Event end time (with timezone) |
is_recurring | boolean | Recurring event flag (default: false) |
recurrence_pattern | varchar(32) | Pattern (e.g., “weekly”, “monthly”) |
recurrence_days | text | Comma-separated or JSON string of days |
created_at | timestamp | Creation timestamp |
updated_at | timestamp | Last update timestamp |
Event Types
EventPalour supports three event delivery models:Online
Virtual events conducted entirely online. Requires
online_link field.Physical
In-person events at a physical venue. Requires
venue, city, and country fields.Hybrid
Both online and physical attendance options. Requires both location and meeting link.
Event Status
Events transition through different statuses during their lifecycle:Pricing Models
Events can be configured as free or paid:| Pricing | Description | Use Case |
|---|---|---|
| Free | No payment required | Community meetups, public talks, open events |
| Paid | Requires ticket purchase | Conferences, workshops, premium events |
For free events, use the
event_registrations table to track attendees. For paid events, use the tickets and purchased_tickets tables.Event Categories
Categories help organize events within a workspace. Theevents_categories table:
Categories are workspace-scoped. Each workspace defines its own category taxonomy.
Event Relationships
Related Entities
Event Images
Store multiple images per event inevents_images table:
Event Speakers
Manage speaker information with theevents_speakers table:
| Field | Type | Description |
|---|---|---|
id | varchar(16) | Speaker ID |
event_id | varchar(16) | Associated event |
name | varchar(255) | Speaker name |
email | varchar(255) | Contact email |
title | varchar(255) | Professional title (e.g., “Senior Engineer”) |
talk | text | Talk/presentation topic |
bio | text | Speaker biography |
image_url | text | Profile image URL |
twitter_handle | varchar(255) | X/Twitter handle |
linkedin_url | text | LinkedIn profile |
instagram_handle | varchar(255) | Instagram handle |
status | speaker_status_enum | Approval status (default: “pending”) |
submission_type | speaker_submission_type_enum | How they joined (default: “self_applied”) |
scheduled_time | timestamp | Presentation time slot |
is_listed | boolean | Show on event page (default: true) |
Speaker Status
Speaker Submission Types
- Invited
- Self-Applied
Speaker was invited directly by the event organizer. Generally auto-approved.
Speaker Application Links
Enable public speaker applications throughspeaker_application_links:
Event Partners
Track sponsors and partners inevents_partners:
Recurring Events
Events can repeat on a schedule using these fields:is_recurring: Set totrueto enable recurrencerecurrence_pattern: Frequency like “weekly”, “monthly”, “daily”recurrence_days: Days when event occurs (format: comma-separated or JSON)
Queue Management
Thequeue_counter field tracks waitlist position when events reach capacity:
Increment
queue_counter when adding users to the waitlist. Use this value to determine their position and notification priority when tickets become available.Event Registration
For free events, registrations are tracked inevent_registrations:
The system enforces a unique constraint on
(user_id, event_id) to prevent duplicate registrations.Best Practices
Short IDs
Short IDs
The 6-character
short_id creates user-friendly URLs like eventpalour.com/e/abc123. Ensure these are generated to be unique and URL-safe.Timezone Handling
Timezone Handling
start_date and end_date use timestamp with timezone. Always store in UTC and convert to local timezone for display.Event Type Validation
Event Type Validation
- Online: Require
online_link - Physical: Require
venue,city,country - Hybrid: Require all location and online fields
Status Transitions
Status Transitions
Implement proper workflow validation:
- Active → Postponed (update dates)
- Active → Canceled (trigger refunds)
- Inactive → Active (re-enable registrations)
Technical Details
Schema Location
Key Relationships
Defined in/lib/db/schema/relations.ts:169-186:
- Events belong to one workspace (many-to-one)
- Events belong to one category (many-to-one)
- Events have many images, speakers, partners, tickets, announcements (one-to-many)
Database Constraints
short_idmust be unique across all events- Foreign key to
workspace.idcascades on delete - Foreign key to
events_categories.iddoes not cascade (protect existing events)