Built motion from commit da24aabd.|2.6.20
[motion2.git] / server / api / faxMessage / faxMessage.model.js
index 49fb952..80fdccb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf889=['../../config/environment','./faxMessage.attributes','FaxMessage','fax_messages','fti_fax_messages','body','FULLTEXT','direction','toLowerCase','out','UserId','FaxInteraction','findOne','FaxInteractionId','update','createdAt','error','utf8mb4','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf'];(function(_0x231b2e,_0x2a33f9){var _0x3feb2a=function(_0x5aa472){while(--_0x5aa472){_0x231b2e['push'](_0x231b2e['shift']());}};_0x3feb2a(++_0x2a33f9);}(_0xf889,0x1e6));var _0x9f88=function(_0xed17d8,_0x472e47){_0xed17d8=_0xed17d8-0x0;var _0x46979e=_0xf889[_0xed17d8];return _0x46979e;};'use strict';var _=require('lodash');var util=require(_0x9f88('0x0'));var logger=require(_0x9f88('0x1'))(_0x9f88('0x2'));var moment=require(_0x9f88('0x3'));var BPromise=require(_0x9f88('0x4'));var rp=require(_0x9f88('0x5'));var fs=require('fs');var path=require(_0x9f88('0x6'));var rimraf=require(_0x9f88('0x7'));var config=require(_0x9f88('0x8'));var attributes=require(_0x9f88('0x9'));module['exports']=function(_0xcd7e93,_0x39ebdd){return _0xcd7e93['define'](_0x9f88('0xa'),attributes,{'tableName':_0x9f88('0xb'),'paranoid':![],'indexes':[{'name':_0x9f88('0xc'),'fields':[_0x9f88('0xd')],'type':_0x9f88('0xe')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x41aeab,_0x252c7a,_0x141164){var _0x547755=_0xcd7e93['models'];var _0x195dca=_0x41aeab['get']({'plain':!![]});if(_0x195dca[_0x9f88('0xf')][_0x9f88('0x10')]()==='in'||_0x195dca[_0x9f88('0xf')][_0x9f88('0x10')]()===_0x9f88('0x11')&&!_0x195dca['secret']&&!_['isNil'](_0x195dca[_0x9f88('0x12')])){_0x547755[_0x9f88('0x13')][_0x9f88('0x14')]({'where':{'id':_0x195dca[_0x9f88('0x15')]}})['then'](function(_0x1d9920){if(_0x1d9920){_0x1d9920[_0x9f88('0x16')]({'lastMsgAt':_0x195dca[_0x9f88('0x17')],'lastMsgDirection':_0x195dca[_0x9f88('0xf')][_0x9f88('0x10')]()});}})['catch'](function(_0x271ee9){console[_0x9f88('0x18')](_0x271ee9);});}_0x141164();}},'charset':_0x9f88('0x19'),'collate':'utf8mb4_unicode_ci'});};
\ No newline at end of file
+var _0xbb0e=['get','direction','toLowerCase','UserId','FaxInteraction','findOne','update','createdAt','catch','error','utf8mb4','utf8mb4_unicode_ci','lodash','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./faxMessage.attributes','exports','FaxMessage','fti_fax_messages','models'];(function(_0x26d1f7,_0x961352){var _0x27e813=function(_0x576387){while(--_0x576387){_0x26d1f7['push'](_0x26d1f7['shift']());}};_0x27e813(++_0x961352);}(_0xbb0e,0x15e));var _0xebb0=function(_0x462351,_0x337118){_0x462351=_0x462351-0x0;var _0x21e182=_0xbb0e[_0x462351];return _0x21e182;};'use strict';var _=require(_0xebb0('0x0'));var util=require('util');var logger=require(_0xebb0('0x1'))(_0xebb0('0x2'));var moment=require(_0xebb0('0x3'));var BPromise=require(_0xebb0('0x4'));var rp=require(_0xebb0('0x5'));var fs=require('fs');var path=require(_0xebb0('0x6'));var rimraf=require(_0xebb0('0x7'));var config=require(_0xebb0('0x8'));var attributes=require(_0xebb0('0x9'));module[_0xebb0('0xa')]=function(_0xde6eed,_0x3e4bfe){return _0xde6eed['define'](_0xebb0('0xb'),attributes,{'tableName':'fax_messages','paranoid':![],'indexes':[{'name':_0xebb0('0xc'),'fields':['body'],'type':'FULLTEXT'}],'timestamps':!![],'hooks':{'afterCreate':function(_0x37e872,_0x3cf9ba,_0x1993d8){var _0x1c6373=_0xde6eed[_0xebb0('0xd')];var _0x7fb08c=_0x37e872[_0xebb0('0xe')]({'plain':!![]});if(_0x7fb08c[_0xebb0('0xf')][_0xebb0('0x10')]()==='in'||_0x7fb08c[_0xebb0('0xf')]['toLowerCase']()==='out'&&!_0x7fb08c['secret']&&!_['isNil'](_0x7fb08c[_0xebb0('0x11')])){_0x1c6373[_0xebb0('0x12')][_0xebb0('0x13')]({'where':{'id':_0x7fb08c['FaxInteractionId']}})['then'](function(_0x5d46d3){if(_0x5d46d3){_0x5d46d3[_0xebb0('0x14')]({'lastMsgAt':_0x7fb08c[_0xebb0('0x15')],'lastMsgDirection':_0x7fb08c['direction'][_0xebb0('0x10')]()});}})[_0xebb0('0x16')](function(_0x492f2f){console[_0xebb0('0x17')](_0x492f2f);});}_0x1993d8();}},'charset':_0xebb0('0x18'),'collate':_0xebb0('0x19')});};
\ No newline at end of file