271910ce1130de35bba5605c37796655d01bc72b
[motion.git] / server / models / voice_voicemail_messages.js
1 /* jshint indent: 2 */
2
3 module.exports = function(sequelize, DataTypes) {
4   var VoiceVoicemailMessages = sequelize.define('VoiceVoicemailMessages', {
5     msgnum: {
6       type: DataTypes.INTEGER(11),
7       defaultValue: 0,
8       allowNull: false
9     },
10     dir: {
11       type: DataTypes.STRING,
12       defaultValue: ''
13     },
14     context: {
15       type: DataTypes.STRING,
16       defaultValue: ''
17     },
18     macrocontext: {
19       type: DataTypes.STRING,
20       defaultValue: ''
21     },
22     callerid: {
23       type: DataTypes.STRING,
24       defaultValue: ''
25     },
26     origtime: {
27       type: DataTypes.STRING,
28       defaultValue: ''
29     },
30     duration: {
31       type: DataTypes.STRING,
32       defaultValue: ''
33     },
34     mailboxuser: {
35       type: DataTypes.STRING,
36       defaultValue: ''
37     },
38     mailboxcontext: {
39       type: DataTypes.STRING,
40       defaultValue: ''
41     },
42     recording: {
43       type: DataTypes.BLOB('long'),
44       defaultValue: null
45     },
46     flag: {
47       type: DataTypes.STRING,
48       defaultValue: ''
49     },
50     msg_id: {
51       type: DataTypes.STRING,
52       defaultValue: ''
53     },
54     stamp: {
55       type: 'TIMESTAMP',
56       allowNull: false
57     }
58   }, {
59     tableName: 'voice_voicemail_messages',
60     indexes: [{
61       name: 'dir',
62       fields: ['dir']
63     }]
64   });
65
66   return VoiceVoicemailMessages;
67 };