Built motion from commit a0baffd.|1.0.1
[motion.git] / server / models / history / report_square_history.js
index 9550825..84118e3 100644 (file)
@@ -1 +1,100 @@
-var _0x4a60=["\x65\x78\x70\x6F\x72\x74\x73","\x52\x65\x70\x6F\x72\x74\x53\x71\x75\x61\x72\x65\x48\x69\x73\x74\x6F\x72\x79","\x53\x54\x52\x49\x4E\x47","\x44\x41\x54\x45","\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65\x5F\x68\x69\x73\x74\x6F\x72\x79","\x64\x65\x66\x69\x6E\x65"];module[_0x4a60[0]]=function(_0x20bex1,_0x20bex2){var _0x20bex3=_0x20bex1[_0x4a60[5]](_0x4a60[1],{network:{type:_0x20bex2[_0x4a60[2]]},network_script:{type:_0x20bex2[_0x4a60[2]]},request:{type:_0x20bex2[_0x4a60[2]]},channel:{type:_0x20bex2[_0x4a60[2]]},language:{type:_0x20bex2[_0x4a60[2]]},type:{type:_0x20bex2[_0x4a60[2]]},uniqueid:{type:_0x20bex2[_0x4a60[2]]},version:{type:_0x20bex2[_0x4a60[2]]},callerid:{type:_0x20bex2[_0x4a60[2]]},calleridname:{type:_0x20bex2[_0x4a60[2]]},callingpres:{type:_0x20bex2[_0x4a60[2]]},callingani2:{type:_0x20bex2[_0x4a60[2]]},callington:{type:_0x20bex2[_0x4a60[2]]},callingtns:{type:_0x20bex2[_0x4a60[2]]},dnid:{type:_0x20bex2[_0x4a60[2]]},rdnis:{type:_0x20bex2[_0x4a60[2]]},context:{type:_0x20bex2[_0x4a60[2]]},extension:{type:_0x20bex2[_0x4a60[2]]},priority:{type:_0x20bex2[_0x4a60[2]]},enhanced:{type:_0x20bex2[_0x4a60[2]]},accountcode:{type:_0x20bex2[_0x4a60[2]]},threadid:{type:_0x20bex2[_0x4a60[2]]},project_name:{type:_0x20bex2[_0x4a60[2]]},joinAt:{type:_0x20bex2[_0x4a60[3]]},leaveAt:{type:_0x20bex2[_0x4a60[3]],unique:true}},{tableName:_0x4a60[4]});return _0x20bex3}
\ No newline at end of file
+/**
+ * Context Model
+ */
+
+module.exports = function(sequelize, DataTypes) {
+
+  var ReportSquareHistory = sequelize.define('ReportSquareHistory', {
+    sourceid: DataTypes.INTEGER,
+    network: {
+      type: DataTypes.STRING,
+    },
+    network_script: {
+      type: DataTypes.STRING,
+    },
+    request: {
+      type: DataTypes.STRING,
+    },
+    channel: {
+      type: DataTypes.STRING,
+    },
+    language: {
+      type: DataTypes.STRING,
+    },
+    type: {
+      type: DataTypes.STRING,
+    },
+    uniqueid: {
+      type: DataTypes.STRING,
+    },
+    version: {
+      type: DataTypes.STRING,
+    },
+    callerid: {
+      type: DataTypes.STRING,
+    },
+    calleridname: {
+      type: DataTypes.STRING,
+    },
+    callingpres: {
+      type: DataTypes.STRING,
+    },
+    callingani2: {
+      type: DataTypes.STRING,
+    },
+    callington: {
+      type: DataTypes.STRING,
+    },
+    callingtns: {
+      type: DataTypes.STRING,
+    },
+    dnid: {
+      type: DataTypes.STRING,
+    },
+    rdnis: {
+      type: DataTypes.STRING,
+    },
+    context: {
+      type: DataTypes.STRING,
+    },
+    extension: {
+      type: DataTypes.STRING,
+    },
+    priority: {
+      type: DataTypes.STRING,
+    },
+    enhanced: {
+      type: DataTypes.STRING,
+    },
+    accountcode: {
+      type: DataTypes.STRING,
+    },
+    threadid: {
+      type: DataTypes.STRING,
+    },
+    project_name: {
+      type: DataTypes.STRING,
+    },
+    prev_project_name: {
+      type: DataTypes.STRING,
+    },
+    joinAt: {
+      type: DataTypes.DATE,
+    },
+    leaveAt: {
+      type: DataTypes.DATE
+    },
+    is_subproject: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: false
+    }
+  }, {
+    tableName: 'report_square_history',
+    indexes: [{
+      name: 'sourceid',
+      fields: ['sourceid']
+    }]
+  });
+  ReportSquareHistory.removeAttribute('id');
+  return ReportSquareHistory;
+};