lastEventAt: {
type: DataTypes.DATE
},
+ deleted: {
+ type: DataTypes.BOOLEAN,
+ defaultValue: false
+ },
tags: {
type: DataTypes.TEXT,
get: function() {
- return this.getDataValue('tags') ? this.getDataValue('tags').split(';').pop() : [];
+ var tags;
+ if (this.getDataValue('tags')) {
+ tags = this.getDataValue('tags').split(';');
+ tags.pop();
+ } else {
+ tags = [];
+ }
+ return tags;
},
set: function(val) {
this.setDataValue('tags', val && val.length ? val.join(';') + ';' : null);
deletedAt: {
type: DataTypes.DATE
},
+ ParentId: {
+ type: DataTypes.INTEGER
+ },
}, {
tableName: 'mail_rooms',
paranoid: true,