timeout: {
type: DataTypes.INTEGER,
defaultValue: 0
+ },
+ whiteLabel: {
+ type: DataTypes.STRING
+ },
+ acceptUrl: {
+ type: DataTypes.STRING
+ },
+ rejectUrl: {
+ type: DataTypes.STRING
+ },
+ acceptMethod: {
+ type: DataTypes.ENUM('GET', 'POST')
+ },
+ rejectMethod: {
+ type: DataTypes.ENUM('GET', 'POST')
+ },
+ actions: {
+ type: DataTypes.STRING,
+ get: function() {
+ return this.getDataValue('actions') ? JSON.parse(this.getDataValue('actions')) : [];
+ },
+ set: function(val) {
+ return this.setDataValue('actions', JSON.stringify(val));
+ }
}
}, {
tableName: 'mail_accounts',
associate: function(models) {
// RELATIONS
+ MailAccount.belongsTo(models.List);
+ MailAccount.belongsTo(models.Template);
MailAccount.hasMany(models.MailRoom);
+ MailAccount.hasMany(models.MailDisposition);
MailAccount.hasMany(models.MailApplication);
MailAccount.hasOne(models.MailServerIn, {
onDelete: 'cascade',
MailAccount.addScope('default', {
include: [{
model: models.MailServerIn,
- attributes: ['id', 'host', 'port', 'username', 'password', 'ssl', 'delete', 'filter', 'state', 'mailbox', 'connTimeout', 'authTimeout', 'keepalive']
+ attributes: ['id', 'host', 'port', 'username', 'password', 'ssl', 'delete', 'filter', 'state', 'mailbox', 'connTimeout', 'authTimeout', 'keepalive', 'source']
}, {
model: models.MailServerOut,
- attributes: ['id', 'host', 'port', 'username', 'password', 'ssl', 'service', 'state']
+ attributes: ['id', 'host', 'port', 'username', 'password', 'ssl', 'service', 'state', 'source']
}, {
model: models.MailApplication,
include: [{