mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 19:05:59 +01:00
first experiments with note entity
This commit is contained in:
17
src/entities/note.js
Normal file
17
src/entities/note.js
Normal file
@@ -0,0 +1,17 @@
|
||||
"use strict";
|
||||
|
||||
class Note {
|
||||
constructor(sql, row) {
|
||||
this.sql = sql;
|
||||
|
||||
for (const key in row) {
|
||||
this[key] = row[key];
|
||||
}
|
||||
}
|
||||
|
||||
async attributes() {
|
||||
return this.sql.getAll("SELECT * FROM attributes WHERE noteId = ?", [this.noteId]);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Note;
|
||||
Reference in New Issue
Block a user