Event
The Event model represents scheduled events within a world. Events are created by users and can be joined (RSVP’d) by other users.
Fields
| Field | Type | Attributes | Description |
|---|---|---|---|
| id | String | @id, @default(cuid()) | Unique event ID |
| name | String | Name of the event | |
| description | String | Description of the event | |
| scheduledAt | DateTime | Date and time the event is scheduled | |
| worldId | String | ID of the world where the event takes place | |
| createdById | String | ID of the user who created the event | |
| RSVPs | EventRSVP[] | @relation | RSVP records for users attending the event |
Relationships
- Event belongs to a World (
worldId). - Event is created by a User (
createdById). - Event has many EventRSVP records (users who RSVP’d).
Example Record
{
"id": "event1",
"name": "Boss Raid",
"description": "Defeat the world boss together!",
"scheduledAt": "2025-09-01T18:00:00.000Z",
"worldId": "world123",
"createdById": "user456",
"RSVPs": [{ "userId": "user789", "eventId": "event1" }]
}