Built motion from commit 2238b68.|1.0.18
[motion.git] / server / models / voice_queue_log.js
1 'use strict';
2
3 module.exports = function(sequelize, DataTypes) {
4
5   var VoiceQueueLog = sequelize.define('VoiceQueueLog', {
6     time: {
7       type: DataTypes.STRING
8     },
9     callid: {
10       type: DataTypes.STRING,
11       allowNull: false,
12       defaultValue: ''
13     },
14     queuename: {
15       type: DataTypes.STRING,
16       allowNull: false,
17       defaultValue: ''
18     },
19     agent: {
20       type: DataTypes.STRING,
21       allowNull: false,
22       defaultValue: ''
23     },
24     'event': {
25       type: DataTypes.STRING,
26       allowNull: false,
27       defaultValue: ''
28     },
29     data1: {
30       type: DataTypes.STRING,
31       allowNull: false,
32       defaultValue: ''
33     },
34     data2: {
35       type: DataTypes.STRING,
36       allowNull: false,
37       defaultValue: ''
38     },
39     data3: {
40       type: DataTypes.STRING,
41       allowNull: false,
42       defaultValue: ''
43     },
44     data4: {
45       type: DataTypes.STRING,
46       allowNull: false,
47       defaultValue: ''
48     },
49     data5: {
50       type: DataTypes.STRING,
51       allowNull: false,
52       defaultValue: ''
53     },
54     dtm: {
55       type: DataTypes.DATE,
56       allowNull: false,
57       defaultValue: sequelize.fn('NOW'),
58     },
59   }, {
60     tableName: 'voice_queues_log',
61     timestamps: false,
62     indexes: [{
63       name: 'event_dtm',
64       fields: ['event', 'dtm']
65     }]
66   });
67
68   return VoiceQueueLog;
69
70 };