X-Git-Url: http://repos.xcallymotion.com/?a=blobdiff_plain;f=server%2Fmodels%2Fmail_application.js;h=0c281103eee7b8a9b5ae5efbed67e99ecbcb69de;hb=d168c38956e2b3512dfb925e8c7f496a3cb1fed0;hp=668adbe86215eb4074ef1cd85feb6962acb203dd;hpb=7d2c48c68a9c0d1f3f9822e1ce6092e864bdd875;p=motion.git diff --git a/server/models/mail_application.js b/server/models/mail_application.js index 668adbe..0c28110 100644 --- a/server/models/mail_application.js +++ b/server/models/mail_application.js @@ -4,7 +4,7 @@ module.exports = function(sequelize, DataTypes) { var MailApplication = sequelize.define('MailApplication', { app: { - type: DataTypes.ENUM('queue', 'agent') + type: DataTypes.ENUM('queue', 'agent', 'sendMail', 'replyMail', 'sendSms') }, priority: { type: DataTypes.INTEGER @@ -17,14 +17,41 @@ module.exports = function(sequelize, DataTypes) { }, interval: { type: DataTypes.STRING + }, + data1: { + type: DataTypes.STRING + }, + data2: { + type: DataTypes.STRING + }, + data3: { + type: DataTypes.STRING + }, + data4: { + type: DataTypes.STRING + }, + data5: { + type: DataTypes.STRING + }, + data6: { + type: DataTypes.STRING + }, + data7: { + type: DataTypes.BLOB + }, + data8: { + type: DataTypes.INTEGER + }, + data9: { + type: DataTypes.INTEGER + }, + data10: { + type: DataTypes.INTEGER } }, { tableName: 'mail_applications', associate: function(models) { // hasMany relations - MailApplication.belongsTo(models.User, { - onDelete: 'restrict' - }); MailApplication.belongsTo(models.Interval); MailApplication.belongsTo(models.MailQueue, { onDelete: 'restrict' @@ -32,6 +59,9 @@ module.exports = function(sequelize, DataTypes) { MailApplication.belongsTo(models.MailAccount, { onDelete: 'restrict' }); + MailApplication.belongsTo(models.User, { + onDelete: 'restrict' + }); } });