b4c6d10831767b8e7e5beccda61402db369e8744
[motion.git] / server / models / fax_application.js
1 'use strict';
2
3 module.exports = function(sequelize, DataTypes) {
4
5   var FaxApplication = sequelize.define('FaxApplication', {
6     app: {
7       type: DataTypes.ENUM('queue', 'agent')
8     },
9     appdata: {
10       type: DataTypes.INTEGER
11     },
12     priority: {
13       type: DataTypes.INTEGER
14     },
15     timeout: {
16       type: DataTypes.INTEGER
17     },
18     interval: {
19       type: DataTypes.STRING,
20       defaultValue: '*|*|*|*'
21     }
22   }, {
23     tableName: 'fax_applications',
24     associate: function(models) {
25       // hasMany relations
26       FaxApplication.belongsTo(models.FaxAccount);
27       FaxApplication.belongsTo(models.FaxQueue);
28       FaxApplication.belongsTo(models.User);
29     }
30   });
31
32   return FaxApplication;
33 };