Built motion from commit da24aabd.|2.6.20
[motion2.git] / server / api / faxMessage / faxMessage.model.js
index 3af564e..80fdccb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x38dc=['secret','isNil','UserId','FaxInteractionId','then','update','createdAt','catch','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','api','moment','rimraf','../../config/environment','./faxMessage.attributes','fax_messages','fti_fax_messages','body','FULLTEXT','models','get','direction','toLowerCase','out'];(function(_0x5013bd,_0x4d4b8d){var _0x5d3e13=function(_0x3dd8a0){while(--_0x3dd8a0){_0x5013bd['push'](_0x5013bd['shift']());}};_0x5d3e13(++_0x4d4b8d);}(_0x38dc,0x91));var _0xc38d=function(_0x3b380d,_0x4bf247){_0x3b380d=_0x3b380d-0x0;var _0x54502b=_0x38dc[_0x3b380d];return _0x54502b;};'use strict';var _=require(_0xc38d('0x0'));var util=require(_0xc38d('0x1'));var logger=require(_0xc38d('0x2'))(_0xc38d('0x3'));var moment=require(_0xc38d('0x4'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0xc38d('0x5'));var config=require(_0xc38d('0x6'));var attributes=require(_0xc38d('0x7'));module['exports']=function(_0x21c10a,_0x453281){return _0x21c10a['define']('FaxMessage',attributes,{'tableName':_0xc38d('0x8'),'paranoid':![],'indexes':[{'name':_0xc38d('0x9'),'fields':[_0xc38d('0xa')],'type':_0xc38d('0xb')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x1d06c8,_0x375696,_0x5a8a4c){var _0x1a1c95=_0x21c10a[_0xc38d('0xc')];var _0x13dfc7=_0x1d06c8[_0xc38d('0xd')]({'plain':!![]});if(_0x13dfc7[_0xc38d('0xe')][_0xc38d('0xf')]()==='in'||_0x13dfc7[_0xc38d('0xe')][_0xc38d('0xf')]()===_0xc38d('0x10')&&!_0x13dfc7[_0xc38d('0x11')]&&!_[_0xc38d('0x12')](_0x13dfc7[_0xc38d('0x13')])){_0x1a1c95['FaxInteraction']['findOne']({'where':{'id':_0x13dfc7[_0xc38d('0x14')]}})[_0xc38d('0x15')](function(_0x172817){if(_0x172817){_0x172817[_0xc38d('0x16')]({'lastMsgAt':_0x13dfc7[_0xc38d('0x17')],'lastMsgDirection':_0x13dfc7['direction'][_0xc38d('0xf')]()});}})[_0xc38d('0x18')](function(_0xf92f1f){console['error'](_0xf92f1f);});}_0x5a8a4c();}},'charset':_0xc38d('0x19'),'collate':_0xc38d('0x1a')});};
\ 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