mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 09:58:32 +02:00
17 lines
478 B
JavaScript
17 lines
478 B
JavaScript
"use strict";
|
|
|
|
const Entity = require('./entity');
|
|
|
|
class NoteTree extends Entity {
|
|
static get tableName() { return "note_tree"; }
|
|
|
|
async getNote() {
|
|
return this.repository.getEntity("SELECT * FROM note_tree WHERE isDeleted = 0 AND noteId = ?", [this.noteId]);
|
|
}
|
|
|
|
async getParentNote() {
|
|
return this.repository.getEntity("SELECT * FROM note_tree WHERE isDeleted = 0 AND parentNoteId = ?", [this.parentNoteId]);
|
|
}
|
|
}
|
|
|
|
module.exports = NoteTree; |