-/* jshint indent: 2 */
+'use strict';
+
+
module.exports = function(sequelize, DataTypes) {
var Interval = sequelize.define('Interval', {
Interval.hasMany(models.MailApplication, {
as: 'MailApplications'
});
- Interval.hasMany(models.MailApplication, {
+ Interval.hasMany(models.ChatApplication, {
as: 'ChatApplications'
});
+ Interval.hasMany(models.FaxApplication, {
+ as: 'FaxApplications'
+ });
// SCOPES MANAGEMENT
Interval.addScope('subintervals', {
include: [{
model: models.Interval,
as: 'SubIntervals',
required: false,
- attributes: ['name', 'interval']
+ attributes: ['name', 'interval', 'id']
}]
});
}
});
-
return Interval;
};