renamed dates in code as well

This commit is contained in:
zadam
2019-03-12 20:58:31 +01:00
parent f65fefe7b1
commit 1c41d459f0
29 changed files with 92 additions and 92 deletions

View File

@@ -9,22 +9,22 @@ const dateUtils = require('../services/date_utils');
* @param {string} branchId
* @param {string} notePath
* @param {boolean} isDeleted
* @param {string} dateModified
* @param {string} utcDateModified
*
* @extends Entity
*/
class RecentNote extends Entity {
static get entityName() { return "recent_notes"; }
static get primaryKeyName() { return "branchId"; }
static get hashedProperties() { return ["branchId", "notePath", "dateCreated", "isDeleted"]; }
static get hashedProperties() { return ["branchId", "notePath", "utcDateCreated", "isDeleted"]; }
beforeSaving() {
if (!this.isDeleted) {
this.isDeleted = false;
}
if (!this.dateCreated) {
this.dateCreated = dateUtils.nowDate();
if (!this.utcDateCreated) {
this.utcDateCreated = dateUtils.nowDate();
}
super.beforeSaving();