Built motion from commit da24aabd.|2.6.20
[motion2.git] / server / api / mailInteraction / mailInteraction.model.js
index 647021a..e42b399 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x359e=['exports','define','MailInteraction','fti_mail_interactions','subject','FULLTEXT','substatus','substatusAt','YYYY-MM-DD\x20HH:mm:ss','closedAt','format','changed','closed','models','get','update','catch','utf8mb4','utf8mb4_unicode_ci','lodash','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','./mailInteraction.attributes'];(function(_0x27af45,_0x1b57aa){var _0x18df21=function(_0x4b7679){while(--_0x4b7679){_0x27af45['push'](_0x27af45['shift']());}};_0x18df21(++_0x1b57aa);}(_0x359e,0x9f));var _0xe359=function(_0x3c3604,_0x7ffec9){_0x3c3604=_0x3c3604-0x0;var _0x5edf87=_0x359e[_0x3c3604];return _0x5edf87;};'use strict';var _=require(_0xe359('0x0'));var util=require('util');var logger=require(_0xe359('0x1'))(_0xe359('0x2'));var moment=require(_0xe359('0x3'));var BPromise=require(_0xe359('0x4'));var rp=require(_0xe359('0x5'));var fs=require('fs');var path=require(_0xe359('0x6'));var rimraf=require(_0xe359('0x7'));var config=require('../../config/environment');var attributes=require(_0xe359('0x8'));module[_0xe359('0x9')]=function(_0x3468b7,_0x16a4ab){return _0x3468b7[_0xe359('0xa')](_0xe359('0xb'),attributes,{'tableName':'mail_interactions','paranoid':![],'indexes':[{'name':_0xe359('0xc'),'fields':[_0xe359('0xd'),'to'],'type':_0xe359('0xe')}],'timestamps':!![],'hooks':{'beforeCreate':function(_0x2edf13,_0x51f4b6,_0x5a9ba1){if(_0x2edf13[_0xe359('0xf')]){_0x2edf13[_0xe359('0x10')]=moment()['format'](_0xe359('0x11'));}if(_0x2edf13['closed']){_0x2edf13[_0xe359('0x12')]=moment()[_0xe359('0x13')](_0xe359('0x11'));}_0x5a9ba1(null,_0x51f4b6);},'beforeUpdate':function(_0x3460b5,_0x358d73,_0x54c7c7){if(_0x3460b5['changed'](_0xe359('0xf'))){_0x3460b5[_0xe359('0x10')]=_0x3460b5[_0xe359('0xf')]?moment()['format'](_0xe359('0x11')):null;}if(_0x3460b5[_0xe359('0x14')](_0xe359('0x15'))){_0x3460b5[_0xe359('0x12')]=moment()[_0xe359('0x13')](_0xe359('0x11'));_0x3460b5['substatus']=null;_0x3460b5[_0xe359('0x10')]=null;}_0x54c7c7(null,_0x3460b5);},'afterUpdate':function(_0x3f7610,_0x13559f,_0x5baaab){var _0x11cb01=_0x3468b7[_0xe359('0x16')];var _0x3b5560=_0x3f7610[_0xe359('0x17')]({'plain':!![]});if(_0x3b5560[_0xe359('0x15')]){return _0x11cb01['MailMessage'][_0xe359('0x18')]({'read':!![]},{'where':{'MailInteractionId':_0x3b5560['id']}})['then'](function(){_0x5baaab();})[_0xe359('0x19')](function(_0x1ae2ad){_0x5baaab(_0x1ae2ad);});}else{_0x5baaab();}}},'charset':_0xe359('0x1a'),'collate':_0xe359('0x1b')});};
\ No newline at end of file
+var _0x519e=['utf8mb4_unicode_ci','lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf','./mailInteraction.attributes','exports','define','mail_interactions','fti_mail_interactions','subject','FULLTEXT','substatus','substatusAt','format','YYYY-MM-DD\x20HH:mm:ss','closed','closedAt','changed','MailMessage','update','then','catch','utf8mb4'];(function(_0x3b3cce,_0xdae6f){var _0xaa76b0=function(_0x5af0d9){while(--_0x5af0d9){_0x3b3cce['push'](_0x3b3cce['shift']());}};_0xaa76b0(++_0xdae6f);}(_0x519e,0x135));var _0xe519=function(_0x37631d,_0x2618eb){_0x37631d=_0x37631d-0x0;var _0x2f6d77=_0x519e[_0x37631d];return _0x2f6d77;};'use strict';var _=require(_0xe519('0x0'));var util=require(_0xe519('0x1'));var logger=require(_0xe519('0x2'))(_0xe519('0x3'));var moment=require('moment');var BPromise=require(_0xe519('0x4'));var rp=require(_0xe519('0x5'));var fs=require('fs');var path=require(_0xe519('0x6'));var rimraf=require(_0xe519('0x7'));var config=require('../../config/environment');var attributes=require(_0xe519('0x8'));module[_0xe519('0x9')]=function(_0x5b116f,_0x43a06f){return _0x5b116f[_0xe519('0xa')]('MailInteraction',attributes,{'tableName':_0xe519('0xb'),'paranoid':![],'indexes':[{'name':_0xe519('0xc'),'fields':[_0xe519('0xd'),'to'],'type':_0xe519('0xe')}],'timestamps':!![],'hooks':{'beforeCreate':function(_0xeab435,_0x3c5d21,_0x5a5177){if(_0xeab435[_0xe519('0xf')]){_0xeab435[_0xe519('0x10')]=moment()[_0xe519('0x11')](_0xe519('0x12'));}if(_0xeab435[_0xe519('0x13')]){_0xeab435[_0xe519('0x14')]=moment()[_0xe519('0x11')](_0xe519('0x12'));}_0x5a5177(null,_0x3c5d21);},'beforeUpdate':function(_0x52d72c,_0x199ed3,_0x33bd93){if(_0x52d72c[_0xe519('0x15')](_0xe519('0xf'))){_0x52d72c[_0xe519('0x10')]=_0x52d72c[_0xe519('0xf')]?moment()[_0xe519('0x11')]('YYYY-MM-DD\x20HH:mm:ss'):null;}if(_0x52d72c[_0xe519('0x15')](_0xe519('0x13'))){_0x52d72c['closedAt']=moment()['format'](_0xe519('0x12'));_0x52d72c[_0xe519('0xf')]=null;_0x52d72c[_0xe519('0x10')]=null;}_0x33bd93(null,_0x52d72c);},'afterUpdate':function(_0x398661,_0x243316,_0x564bb8){var _0x33215f=_0x5b116f['models'];var _0x59ae37=_0x398661['get']({'plain':!![]});if(_0x59ae37[_0xe519('0x13')]){return _0x33215f[_0xe519('0x16')][_0xe519('0x17')]({'read':!![]},{'where':{'MailInteractionId':_0x59ae37['id']}})[_0xe519('0x18')](function(){_0x564bb8();})[_0xe519('0x19')](function(_0x535c78){_0x564bb8(_0x535c78);});}else{_0x564bb8();}}},'charset':_0xe519('0x1a'),'collate':_0xe519('0x1b')});};
\ No newline at end of file