Skip to main content

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

FieldTypeAttributesDescription
idString@id, @default(cuid())Unique event ID
nameStringName of the event
descriptionStringDescription of the event
scheduledAtDateTimeDate and time the event is scheduled
worldIdStringID of the world where the event takes place
createdByIdStringID of the user who created the event
RSVPsEventRSVP[]@relationRSVP 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" }]
}