Database
The script uses 4 database tables. Import install.sql to create them.
Tables
code9_eventcreator_events
Main events table storing all event data.
| Column | Type | Default | Description |
|---|---|---|---|
id | INT (PK, AI) | Unique event identifier | |
owner_identifier | VARCHAR(60) | Creator's framework identifier | |
owner_name | VARCHAR(60) | Creator's display name | |
name | VARCHAR(255) | Event name | |
category | VARCHAR(50) | Category value key | |
short_desc | VARCHAR(255) | NULL | Short description |
long_desc | TEXT | NULL | Full description |
image | VARCHAR(255) | NULL | Cover image URL |
start_date | VARCHAR(20) | NULL | Start date (YYYY-MM-DD) |
end_date | VARCHAR(20) | NULL | End date (YYYY-MM-DD) |
start_time | VARCHAR(10) | NULL | Start time (HH:MM) |
end_time | VARCHAR(10) | NULL | End time (HH:MM) |
location_name | VARCHAR(255) | NULL | Venue/location name |
coords | LONGTEXT | NULL | JSON {x, y, z} coordinates |
location_desc | TEXT | NULL | Meeting point details |
is_paid | VARCHAR(10) | 'free' | 'free' or 'paid' |
price | INT | 0 | Entry fee amount |
max_participants | INT | 0 | Max participants (0 = unlimited) |
join_type | VARCHAR(20) | 'instant' | 'instant' or 'approval' |
visibility | VARCHAR(20) | 'public' | 'public' or 'job' |
rules | TEXT | NULL | Event rules text |
status | VARCHAR(20) | 'pending' | pending/active/rejected/past/deleted |
participants | LONGTEXT | '[]' | JSON array of participant objects |
pending_requests | LONGTEXT | '[]' | JSON array of pending requests |
reject_reason | TEXT | NULL | Reason for rejection |
created_at | TIMESTAMP | CURRENT_TIMESTAMP | Creation timestamp |
code9_eventcreator_categories
Event categories with custom icons.
| Column | Type | Description |
|---|---|---|
id | INT (PK, AI) | Unique category identifier |
label | VARCHAR(100) | Display label (e.g., "Party") |
value | VARCHAR(50) (UNIQUE) | Internal key (e.g., "party") |
icon | VARCHAR(100) | Lucide icon name (e.g., "PartyPopper") |
created_at | TIMESTAMP | Creation timestamp |
code9_eventcreator_creators
Registered event creators.
| Column | Type | Description |
|---|---|---|
id | INT (PK, AI) | Unique creator identifier |
identifier | VARCHAR(60) (UNIQUE) | Framework identifier |
name | VARCHAR(60) | First name |
surname | VARCHAR(60) | Last name |
job | VARCHAR(50) | Job name |
avatar | VARCHAR(255) | Avatar URL |
created_at | TIMESTAMP | Creation timestamp |
code9_eventcreator_earnings
Revenue and withdrawal transaction records.
| Column | Type | Description |
|---|---|---|
id | INT (PK, AI) | Unique transaction identifier |
creator_identifier | VARCHAR(60) | Creator's identifier |
event_id | INT (FK) | References events.id (SET NULL on delete) |
amount | DECIMAL(10,2) | Transaction amount |
type | VARCHAR(20) | 'revenue' or 'withdrawal' |
status | VARCHAR(20) | 'pending' or 'completed' |
description | TEXT | Transaction description |
created_at | TIMESTAMP | Transaction timestamp |
Auto-Archive
A server-side thread runs every 60 seconds and checks all active events. Events whose end date/time has passed are automatically marked as 'past'.
