-var _0x44fc=["\x63\x72\x79\x70\x74\x6F","\x65\x78\x70\x6F\x72\x74\x73","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E","\x53\x54\x52\x49\x4E\x47","\x49\x4E\x54\x45\x47\x45\x52","\x42\x4F\x4F\x4C\x45\x41\x4E","\x55\x4E\x53\x45\x45\x4E","\x49\x4D\x41\x50","\x50\x4F\x50\x33","\x43\x4F\x4E\x4E\x45\x43\x54\x45\x44","\x44\x49\x53\x43\x4F\x4E\x4E\x45\x43\x54\x45\x44","\x45\x52\x52\x4F\x52","\x55\x4E\x4B\x4E\x4F\x57\x4E","\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x73\x5F\x69\x6E","\x64\x65\x66\x69\x6E\x65"];var crypto=require(_0x44fc[0]);module[_0x44fc[1]]=function(_0x7a19x2,_0x7a19x3){var _0x7a19x4=_0x7a19x2[_0x44fc[14]](_0x44fc[2],{description:_0x7a19x3[_0x44fc[3]],host:_0x7a19x3[_0x44fc[3]],username:_0x7a19x3[_0x44fc[3]],password:_0x7a19x3[_0x44fc[3]],port:_0x7a19x3[_0x44fc[4]],mailbox:_0x7a19x3[_0x44fc[3]],ssl:{type:_0x7a19x3[_0x44fc[5]],defaultValue:false},delete:{type:_0x7a19x3[_0x44fc[5]],defaultValue:false},filter:{type:_0x7a19x3.ENUM(_0x44fc[6]),defaultValue:_0x44fc[6]},protocol:{type:_0x7a19x3.ENUM(_0x44fc[7],_0x44fc[8]),defaultValue:_0x44fc[7]},state:{type:_0x7a19x3.ENUM(_0x44fc[9],_0x44fc[10],_0x44fc[11],_0x44fc[12]),defaultValue:_0x44fc[12]}},{tableName:_0x44fc[13]});return _0x7a19x4}
\ No newline at end of file
+'use strict';
+
+module.exports = function(sequelize, DataTypes) {
+
+ var MailServerIn = sequelize.define('MailServerIn', {
+ description: DataTypes.STRING,
+ host: DataTypes.STRING,
+ username: {
+ type: DataTypes.STRING,
+ unique: true
+ },
+ password: DataTypes.STRING,
+ port: DataTypes.INTEGER,
+ mailbox: DataTypes.STRING,
+ ssl: {
+ type: DataTypes.BOOLEAN,
+ defaultValue: false
+ },
+ delete: {
+ type: DataTypes.BOOLEAN,
+ defaultValue: false
+ },
+ filter: {
+ type: DataTypes.ENUM('UNSEEN'),
+ defaultValue: 'UNSEEN'
+ },
+ protocol: {
+ type: DataTypes.ENUM('IMAP', 'POP3'),
+ defaultValue: 'IMAP'
+ },
+ state: {
+ type: DataTypes.ENUM('CONNECTING', 'CONNECTED', 'DISCONNECTED', 'ERROR', 'UNKNOWN'),
+ defaultValue: 'UNKNOWN'
+ },
+ source: {
+ type: DataTypes.STRING
+ },
+ connTimeout: {
+ type: DataTypes.INTEGER,
+ defaultValue: 10000,
+ get: function() {
+ return this.getDataValue('connTimeout') ? this.getDataValue('connTimeout') / 1000 : null;
+ },
+ set: function(val) {
+ this.setDataValue('connTimeout', val * 1000);
+ }
+ },
+ authTimeout: {
+ type: DataTypes.INTEGER,
+ defaultValue: 5000,
+ get: function() {
+ return this.getDataValue('authTimeout') ? this.getDataValue('authTimeout') / 1000 : null;
+ },
+ set: function(val) {
+ this.setDataValue('authTimeout', val * 1000);
+ }
+ },
+ keepalive: {
+ type: DataTypes.BOOLEAN,
+ defaultValue: true
+ }
+ }, {
+ tableName: 'mail_servers_in'
+ });
+
+ return MailServerIn;
+};