Built motion from commit 82438f7.|0.0.115
[motion.git] / server / models / sms_room.js
index e33304e..7558bb3 100644 (file)
@@ -5,7 +5,7 @@ module.exports = function(sequelize, DataTypes) {
     from: {
       type: DataTypes.STRING,
       validate: {
-        is: /^[0-9]+$/
+        is: /^[\+]?[0-9]+$/
       }
     },
     status: {
@@ -28,9 +28,20 @@ module.exports = function(sequelize, DataTypes) {
         this.setDataValue('tags', val && val.length ? val.join(';') + ';' : null);
       }
     },
+    waiting: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: false
+    },
     disposition: {
       type: DataTypes.STRING
     },
+    ParentId: {
+      type: DataTypes.INTEGER
+    },
+    voiceSource: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: false
+    }
   }, {
     tableName: 'sms_rooms',
     associate: function(models) {