Built motion from commit 654a660.|0.0.150
[motion.git] / server / models / int_sugarcrm_field.js
1 'use strict';
2
3 module.exports = function(sequelize, DataTypes) {
4   return sequelize.define('SugarcrmField', {
5     type: {
6       type: DataTypes.ENUM('string', 'variable', 'customVariable', 'keyValue'),
7       defaultValue: 'string'
8     },
9     content: DataTypes.STRING,
10     key: DataTypes.STRING,
11     keyType: {
12       type: DataTypes.ENUM('string', 'variable', 'customVariable')
13     },
14     keyContent: DataTypes.STRING,
15     idField: DataTypes.STRING,
16     variableName: DataTypes.STRING
17   }, {
18     tableName: 'int_sugarcrm_fields',
19     associate: function(models) {
20       models.SugarcrmField.belongsTo(models.Variable);
21     }
22   });
23 };