Fix issue #98: Sync notes from dragonroll to foundry
All checks were successful
Test / test (push) Successful in 2s

This commit is contained in:
Gitea OpenCode Agent
2026-10-15 23:19:43 +00:00
parent c9ee16f2f2
commit 07dcf08616
11 changed files with 780 additions and 4 deletions

View File

@@ -14,7 +14,16 @@ const NoteSchema = new Schema({
ref: 'Folder'
},
color: { type: String },
// The journal page this note is written as in the linked Foundry world: the
// page of the one "Dragonroll" journal whose rows carry this note's id in
// their `dragonroll-foundry.noteId` flag (see the module's notes sync).
foundryPageId: { type: String },
date: { type: Date, default: Date.now }
});
NoteSchema.index(
{ campaign: 1, foundryPageId: 1 },
{ unique: true, partialFilterExpression: { foundryPageId: { $type: 'string' } } }
);
module.exports = mongoose.model('Note', NoteSchema);