Skip to main content

World

The World model represents a game world. Worlds are created by users and can have members, bosses, notes, events, and a unique join code.

Fields

FieldTypeAttributesDescription
idString@id, @default(cuid())Unique world ID
nameStringName of the world
descriptionStringDescription of the world
createdAtDateTime@default(now())Timestamp when the world was created
joinCodeJoinCode?@relationUnique join code for this world
membershipsWorldMembership[]@relationMembers of the world
bossesWorldBossProgress[]@relationBoss progress records for this world
notesNote[]@relationNotes created in this world
eventsEvent[]@relationEvents scheduled in this world

Relationships

  • World can have one JoinCode.
  • World has many WorldMemberships (users with roles).
  • World has many Bosses (via WorldBossProgress).
  • World has many Notes.
  • World has many Events.

Example Record

{
"id": "world123",
"name": "Adventure Realm",
"description": "A world for epic quests.",
"createdAt": "2025-09-01T18:00:00.000Z",
"joinCode": {
"id": "joincode1",
"code": "abc123"
},
"memberships": [{ "userId": "user123", "role": "OWNER" }],
"bosses": [{ "id": "progress1", "bossId": "boss1", "killed": false }],
"notes": [{ "id": "note1", "title": "Strategy" }],
"events": [{ "id": "event1", "name": "Boss Raid" }]
}