mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 18:12:29 +08:00
18 lines
535 B
JavaScript
18 lines
535 B
JavaScript
"use strict";
|
|
|
|
const Entity = require('./entity');
|
|
|
|
class NoteTree extends Entity {
|
|
static get tableName() { return "note_tree"; }
|
|
static get primaryKeyName() { return "noteTreeId"; }
|
|
|
|
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; |