318d984c09f2816b91651ab171d6647425811f8e
[motion.git] / server / models / sugarcrm_account.js
1 'use strict';
2
3 module.exports = function(sequelize, DataTypes) {
4   return sequelize.define('SugarcrmAccount', {
5     name: DataTypes.STRING,
6     description: DataTypes.STRING,
7     username: {
8       type: DataTypes.STRING
9     },
10     remoteUri: DataTypes.STRING,
11     password: DataTypes.STRING
12   }, {
13     tableName: 'sugarcrm_accounts',
14     associate: function(models) {
15       models.SugarcrmAccount.hasMany(models.SugarcrmConfiguration, {
16         foreignKey: 'AccountId'
17       });
18     }
19   });
20 };