2018-01-29 18:34:59 -05:00
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
const Entity = require('./entity');
|
2018-03-31 10:51:37 -04:00
|
|
|
const repository = require('../services/repository');
|
2018-01-29 18:34:59 -05:00
|
|
|
|
2018-03-24 22:02:26 -04:00
|
|
|
class Label extends Entity {
|
|
|
|
|
static get tableName() { return "labels"; }
|
|
|
|
|
static get primaryKeyName() { return "labelId"; }
|
2018-01-29 23:35:36 -05:00
|
|
|
|
2018-01-29 18:34:59 -05:00
|
|
|
async getNote() {
|
2018-03-31 10:51:37 -04:00
|
|
|
return await repository.getEntity("SELECT * FROM notes WHERE noteId = ?", [this.noteId]);
|
2018-01-29 18:34:59 -05:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2018-03-24 22:02:26 -04:00
|
|
|
module.exports = Label;
|