basic entities for attributes (unification of labels and relations)

This commit is contained in:
azivner
2018-08-02 22:48:21 +02:00
parent 040f9185f8
commit 097114c0f2
10 changed files with 253 additions and 25 deletions

View File

@@ -3,6 +3,7 @@ const NoteRevision = require('../entities/note_revision');
const Image = require('../entities/image');
const NoteImage = require('../entities/note_image');
const Branch = require('../entities/branch');
const Attribute = require('../entities/attribute');
const Label = require('../entities/label');
const Relation = require('../entities/relation');
const RecentNote = require('../entities/recent_note');
@@ -13,7 +14,10 @@ const repository = require('../services/repository');
function createEntityFromRow(row) {
let entity;
if (row.labelId) {
if (row.attributeId) {
entity = new Attribute(row);
}
else if (row.labelId) {
entity = new Label(row);
}
else if (row.relationId) {