Built motion from commit c2984ba.|0.0.114
[motion.git] / server / models / chat_application.js
index 0faa3b2..fd65ce0 100644 (file)
@@ -1 +1,63 @@
-var _0xf153=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x43\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x71\x75\x65\x75\x65","\x61\x67\x65\x6E\x74","\x49\x4E\x54\x45\x47\x45\x52","\x53\x54\x52\x49\x4E\x47","\x63\x68\x61\x74\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x62\x65\x6C\x6F\x6E\x67\x73\x54\x6F","\x64\x65\x66\x69\x6E\x65"];_0xf153[0];module[_0xf153[1]]=function(_0xe19fx1,_0xe19fx2){var _0xe19fx3=_0xe19fx1[_0xf153[9]](_0xf153[2],{app:{type:_0xe19fx2.ENUM(_0xf153[3],_0xf153[4])},priority:{type:_0xe19fx2[_0xf153[5]]},timeout:{type:_0xe19fx2[_0xf153[5]]},interval:{type:_0xe19fx2[_0xf153[6]]}},{tableName:_0xf153[7],associate:function(_0xe19fx4){_0xe19fx3[_0xf153[8]](_0xe19fx4.ChatWebsite);_0xe19fx3[_0xf153[8]](_0xe19fx4.Interval);_0xe19fx3[_0xf153[8]](_0xe19fx4.ChatQueue);_0xe19fx3[_0xf153[8]](_0xe19fx4.User)}});return _0xe19fx3}
\ No newline at end of file
+'use strict';
+
+module.exports = function(sequelize, DataTypes) {
+
+  var ChatApplication = sequelize.define('ChatApplication', {
+    app: {
+      type: DataTypes.ENUM('queue', 'agent')
+    },
+    priority: {
+      type: DataTypes.INTEGER
+    },
+    timeout: {
+      type: DataTypes.INTEGER,
+      validate: {
+        min: 1
+      }
+    },
+    interval: {
+      type: DataTypes.STRING
+    },
+    data1: {
+      type: DataTypes.STRING
+    },
+    data2: {
+      type: DataTypes.STRING
+    },
+    data3: {
+      type: DataTypes.STRING
+    },
+    data4: {
+      type: DataTypes.STRING
+    },
+    data5: {
+      type: DataTypes.STRING
+    },
+    data6: {
+      type: DataTypes.STRING
+    },
+    data7: {
+      type: DataTypes.BLOB
+    },
+    data8: {
+      type: DataTypes.INTEGER
+    },
+    data9: {
+      type: DataTypes.INTEGER
+    },
+    data10: {
+      type: DataTypes.INTEGER
+    }
+  }, {
+    tableName: 'chat_applications',
+    associate: function(models) {
+      // hasMany relations
+      ChatApplication.belongsTo(models.ChatWebsite);
+      ChatApplication.belongsTo(models.Interval);
+      ChatApplication.belongsTo(models.ChatQueue);
+      ChatApplication.belongsTo(models.User);
+    }
+  });
+
+  return ChatApplication;
+};