Built motion from commit 1333b3551.|1.0.38
[motion.git] / server / models / history / report_square_history.js
1 /**
2  * Context Model
3  */
4
5 module.exports = function(sequelize, DataTypes) {
6
7   var ReportSquareHistory = sequelize.define('ReportSquareHistory', {
8     sourceid: DataTypes.INTEGER,
9     network: {
10       type: DataTypes.STRING,
11     },
12     network_script: {
13       type: DataTypes.STRING,
14     },
15     request: {
16       type: DataTypes.STRING,
17     },
18     channel: {
19       type: DataTypes.STRING,
20     },
21     language: {
22       type: DataTypes.STRING,
23     },
24     type: {
25       type: DataTypes.STRING,
26     },
27     uniqueid: {
28       type: DataTypes.STRING,
29     },
30     version: {
31       type: DataTypes.STRING,
32     },
33     callerid: {
34       type: DataTypes.STRING,
35     },
36     calleridname: {
37       type: DataTypes.STRING,
38     },
39     callingpres: {
40       type: DataTypes.STRING,
41     },
42     callingani2: {
43       type: DataTypes.STRING,
44     },
45     callington: {
46       type: DataTypes.STRING,
47     },
48     callingtns: {
49       type: DataTypes.STRING,
50     },
51     dnid: {
52       type: DataTypes.STRING,
53     },
54     rdnis: {
55       type: DataTypes.STRING,
56     },
57     context: {
58       type: DataTypes.STRING,
59     },
60     extension: {
61       type: DataTypes.STRING,
62     },
63     priority: {
64       type: DataTypes.STRING,
65     },
66     enhanced: {
67       type: DataTypes.STRING,
68     },
69     accountcode: {
70       type: DataTypes.STRING,
71     },
72     threadid: {
73       type: DataTypes.STRING,
74     },
75     project_name: {
76       type: DataTypes.STRING,
77     },
78     prev_project_name: {
79       type: DataTypes.STRING,
80     },
81     joinAt: {
82       type: DataTypes.DATE,
83     },
84     leaveAt: {
85       type: DataTypes.DATE
86     },
87     is_subproject: {
88       type: DataTypes.BOOLEAN,
89       defaultValue: false
90     }
91   }, {
92     tableName: 'report_square_history',
93     indexes: [{
94       name: 'sourceid',
95       fields: ['sourceid']
96     }]
97   });
98   ReportSquareHistory.removeAttribute('id');
99   return ReportSquareHistory;
100 };