Built motion from commit 2239aeb.|0.0.113
[motion.git] / server / models / history / report_call_history.js
index 0bda734..d1411b2 100644 (file)
@@ -11,7 +11,7 @@ module.exports = function(sequelize, DataTypes) {
     },
     type: {
       type: DataTypes.ENUM,
-      values: ['inbound', 'internal', 'outbound']
+      values: ['inbound', 'internal', 'outbound', 'inbound-fax', 'outbound-fax', 'tigerdial']
     },
     tag: DataTypes.STRING,
     accountcode: DataTypes.STRING,
@@ -43,18 +43,18 @@ module.exports = function(sequelize, DataTypes) {
   }, {
     tableName: 'report_call_history',
     associate: function(models) {
-      ReportCallHistory.hasMany(models.ReportQueueHistory, {
-        as: 'HistoryQueueCalls',
-        foreignKey: 'uniqueid',
-        constraints: false
-      });
-      ReportCallHistory.hasMany(models.ReportAgentHistory, {
-        as: 'HistoryReportAgents',
-        foreignKey: 'uniqueid',
-        constraints: false
-      });
+      // ReportCallHistory.hasMany(models.ReportQueueHistory, {
+      //   as: 'HistoryQueueCalls',
+      //   foreignKey: 'uniqueid',
+      //   constraints: false
+      // });
+      // ReportCallHistory.hasMany(models.ReportAgentHistory, {
+      //   as: 'HistoryReportAgents',
+      //   foreignKey: 'uniqueid',
+      //   constraints: false
+      // });
     }
   });
-
+  ReportCallHistory.removeAttribute('id');
   return ReportCallHistory;
 };