Built motion from commit a0baffd.|1.0.1
[motion.git] / server / models / history / report_mail_history.js
index 69578f0..185b8a3 100644 (file)
@@ -7,6 +7,7 @@ var moment = require('moment');
 module.exports = function(sequelize, DataTypes) {
 
   var ReportMailHistory = sequelize.define('ReportMailHistory', {
+    sourceid: DataTypes.INTEGER,
     uniqueid: DataTypes.STRING,
     timeslot: DataTypes.INTEGER,
     subject: DataTypes.STRING,
@@ -30,9 +31,14 @@ module.exports = function(sequelize, DataTypes) {
     },
     calledAt: DataTypes.DATE,
     connectedAt: DataTypes.DATE,
+    rejectedAt: DataTypes.DATE,
     from: DataTypes.STRING
   }, {
-    tableName: 'report_mail_history'
+    tableName: 'report_mail_history',
+    indexes: [{
+      name: 'sourceid',
+      fields: ['sourceid']
+    }]
   });
   ReportMailHistory.removeAttribute('id');
   return ReportMailHistory;