Note
The Note model represents notes created by users within worlds. Notes can be used for strategies, reminders, or any information relevant to a world.
Fields
| Field | Type | Attributes | Description |
|---|---|---|---|
| id | String | @id, @default(cuid()) | Unique note ID |
| title | String | Title of the note | |
| content | String | Content of the note | |
| tag | String | Tag or category for the note | |
| authorId | String | ID of the user who authored the note | |
| author | User | @relation | The user who authored the note |
| worldId | String | ID of the world the note belongs to | |
| world | World | @relation | The world associated with the note |
| createdAt | DateTime | @default(now()) | Timestamp when the note was created |
Relationships
- Note belongs to a User (
authorId). - Note belongs to a World (
worldId).
Example Record
{
"id": "note1",
"title": "Strategy",
"content": "Focus on the east gate first.",
"tag": "battle",
"authorId": "user123",
"worldId": "world123",
"createdAt": "2025-09-01T18:00:00.000Z",
"author": {
"id": "user123",
"username": "player1"
},
"world": {
"id": "world123",
"name": "Adventure Realm"
}
}