trilium/src/entities/note_image.js

15 lines
407 B
JavaScript
Raw Normal View History

2018-04-01 10:15:06 +08:00
"use strict";
const Entity = require('./entity');
const repository = require('../services/repository');
class NoteImage extends Entity {
static get tableName() { return "note_images"; }
static get primaryKeyName() { return "noteImageId"; }
async getNote() {
return await repository.getEntity("SELECT * FROM notes WHERE noteId = ?", [this.noteId]);
}
}
module.exports = NoteImage;