Built motion from commit c2984ba.|0.0.114
[motion.git] / server / models / history / report_chat_history.js
index c203d4d..011222f 100644 (file)
@@ -18,7 +18,7 @@ module.exports = function(sequelize, DataTypes) {
     visitorid: DataTypes.STRING,
     visitorname: DataTypes.STRING,
     visitoremail: DataTypes.STRING,
-    queueid: DataTypes.INTEGER,
+    queue: DataTypes.INTEGER,
     queuename: DataTypes.STRING,
     roomid: DataTypes.INTEGER,
     reason: {
@@ -27,12 +27,7 @@ module.exports = function(sequelize, DataTypes) {
     },
     connectid: {
       type: DataTypes.STRING,
-      unique: true,
-      set: function(agentconnectedAt) {
-        this.setDataValue('connectid', this.uniqueid);
-        this.setDataValue('reason', 'connect');
-        this.setDataValue('connectedAt', moment().format("YYYY-MM-DD HH:mm:ss"));
-      }
+      unique: true
     },
     calledAt: DataTypes.DATE,
     rejectedAt: DataTypes.DATE,
@@ -41,5 +36,7 @@ module.exports = function(sequelize, DataTypes) {
     tableName: 'report_chat_history'
   });
 
+  ReportChatHistory.removeAttribute('id');
+
   return ReportChatHistory;
 };