type: DataTypes.INTEGER,
defaultValue: 0
},
- // phone: {
- // // type: DataTypes.INTEGER,
- // // unique: true
- // type: DataTypes.STRING,
- // unique: true,
- // validate: {
- // is: /^[0-9]+$/
- // }
- // },
acceptUrl: {
type: DataTypes.STRING
},
replyMethod: {
type: DataTypes.ENUM('GET', 'POST')
},
+ closeUrl: {
+ type: DataTypes.STRING
+ },
+ closeMethod: {
+ type: DataTypes.ENUM('GET', 'POST')
+ },
actions: {
type: DataTypes.STRING,
get: function() {
set: function(val) {
return this.setDataValue('actions', JSON.stringify(val));
}
- },
- reply: {
- type: DataTypes.BOOLEAN,
- defaultValue: false
}
}, {
tableName: 'openchannel_accounts',
// SCOPES
OpenchannelAccount.hasMany(models.OpenchannelDisposition);
OpenchannelAccount.belongsTo(models.List);
+ OpenchannelAccount.addScope('default', {
+ include: [{
+ model: models.OpenchannelApplication,
+ include: [{
+ model: models.User,
+ attributes: ['id',
+ 'name',
+ 'email',
+ 'internal',
+ 'fullname'
+ ]
+ }, {
+ model: models.OpenchannelQueue
+ }]
+ }]
+ });
}
});
return OpenchannelAccount;