Built motion from commit a0baffd.|1.0.1
[motion.git] / server / models / voice_queue.js
index 71d35c8..8067431 100644 (file)
@@ -43,12 +43,12 @@ module.exports = function(sequelize, DataTypes) {
     timeout: {
       type: DataTypes.INTEGER(11),
       allowNull: true,
-      defaultValue: 0
+      defaultValue: 15
     },
     retry: {
       type: DataTypes.INTEGER(11),
       allowNull: true,
-      defaultValue: 0
+      defaultValue: 2
     },
     timeoutpriority: {
       type: DataTypes.STRING,
@@ -292,6 +292,10 @@ module.exports = function(sequelize, DataTypes) {
         foreignKey: 'queue',
         required: false
       });
+      VoiceQueue.belongsToMany(models.User, {
+        through: models.UserHasVoiceQueuePermit,
+        as: 'PVoiceQueues'
+      });
     }
   });