Skip to main content

JoinCode

The JoinCode model represents a unique code that allows users to join a specific world. Each world has one join code, and each join code is associated with only one world.

Fields

FieldTypeAttributesDescription
idString@id, @default(cuid())Unique join code ID
codeString@uniqueThe actual join code string
worldIdString@uniqueID of the world this join code belongs to
worldWorld@relationThe world associated with this join code
createdAtDateTime@default(now())Timestamp when the join code was created

Relationships

  • JoinCode belongs to a World (worldId).
  • Each World can have only one JoinCode.

Example Record

{
"id": "joincode1",
"code": "abc123",
"worldId": "world123",
"createdAt": "2025-09-01T18:00:00.000Z",
"world": {
"id": "world123",
"name": "Adventure Realm"
}
}