Notes/src/entities/note.js

17 lines
313 B
JavaScript
Raw Normal View History

2018-01-28 23:16:50 -05:00
"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;