converted option operations to repository

This commit is contained in:
azivner
2018-05-22 00:22:43 -04:00
parent 49a53f7a45
commit cd45bcfd03
4 changed files with 30 additions and 13 deletions

View File

@@ -1,11 +1,18 @@
"use strict";
const Entity = require('./entity');
const dateUtils = require('../services/date_utils');
class Option extends Entity {
static get tableName() { return "options"; }
static get primaryKeyName() { return "name"; }
static get syncedProperties() { return ["name", "value"]; }
beforeSaving() {
super.beforeSaving();
this.dateModified = dateUtils.nowDate();
}
}
module.exports = Option;