mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-28 10:32:27 +08:00
15 lines
412 B
JavaScript
15 lines
412 B
JavaScript
![]() |
"use strict";
|
||
|
|
||
|
const Entity = require('./entity');
|
||
|
|
||
|
class NoteTree extends Entity {
|
||
|
async getNote() {
|
||
|
return this.sql.getEntity("SELECT * FROM note_tree WHERE isDeleted = 0 AND noteId = ?", [this.noteId]);
|
||
|
}
|
||
|
|
||
|
async getParentNote() {
|
||
|
return this.sql.getEntity("SELECT * FROM note_tree WHERE isDeleted = 0 AND parentNoteId = ?", [this.parentNoteId]);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
module.exports = NoteTree;
|