status: {
type: DataTypes.ENUM('NEW', 'OPEN', 'CLOSED', 'UNMANAGED'),
defaultValue: 'NEW'
- }
+ },
+ tags: {
+ type: DataTypes.TEXT,
+ get: function() {
+ 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);
+ }
+ },
+ disposition: {
+ type: DataTypes.STRING
+ },
}, {
tableName: 'sms_rooms',
associate: function(models) {