Built motion from commit 95b01fa.|0.0.70
[motion.git] / server / models / fax_account.js
1 /**
2  * Chat Website Model
3  */
4
5 var crypto = require('crypto');
6
7 module.exports = function(sequelize, DataTypes) {
8
9         var FaxAccount = sequelize.define('FaxAccount', {
10                 description: DataTypes.STRING,
11                 name: DataTypes.STRING,
12                 phone: {
13                         type: DataTypes.STRING,
14                         unique: true
15                 },
16                 ecm: {
17                         type: DataTypes.BOOLEAN,
18                         defaultValue: false
19                 },
20                 faxheader: DataTypes.STRING,
21                 localid: DataTypes.STRING,
22                 maxrate: {
23                         type: DataTypes.ENUM('9600', '14400', '33600'),
24                         defaultValue: '33600'
25                 },
26                 minrate: {
27                         type: DataTypes.ENUM('9600', '14400', '33600'),
28                         defaultValue: '9600'
29                 }
30         }, {
31                 tableName: 'fax_accounts',
32                 associate: function(models) {
33                         // FaxAccount.belongsTo(models.Trunk);
34                         FaxAccount.hasMany(models.FaxRoom);
35                         FaxAccount.hasMany(models.FaxApplication);
36                 }
37         });
38
39         return FaxAccount;
40 };