Built motion from commit 449495f6.|2.6.27
[motion2.git] / server / api / faxMessage / faxMessage.model.js
index 02af039..25c2405 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf04f=['request-promise','path','../../config/environment','define','fax_messages','fti_fax_messages','body','FULLTEXT','models','toLowerCase','direction','secret','UserId','FaxInteraction','then','update','createdAt','catch','error','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','api','bluebird'];(function(_0x107466,_0x303d03){var _0x10434f=function(_0x4d6cfb){while(--_0x4d6cfb){_0x107466['push'](_0x107466['shift']());}};_0x10434f(++_0x303d03);}(_0xf04f,0x7d));var _0xff04=function(_0x382e89,_0x4768c0){_0x382e89=_0x382e89-0x0;var _0x3a1318=_0xf04f[_0x382e89];return _0x3a1318;};'use strict';var _=require(_0xff04('0x0'));var util=require(_0xff04('0x1'));var logger=require(_0xff04('0x2'))(_0xff04('0x3'));var moment=require('moment');var BPromise=require(_0xff04('0x4'));var rp=require(_0xff04('0x5'));var fs=require('fs');var path=require(_0xff04('0x6'));var rimraf=require('rimraf');var config=require(_0xff04('0x7'));var attributes=require('./faxMessage.attributes');module['exports']=function(_0x825439,_0x2555ce){return _0x825439[_0xff04('0x8')]('FaxMessage',attributes,{'tableName':_0xff04('0x9'),'paranoid':![],'indexes':[{'name':_0xff04('0xa'),'fields':[_0xff04('0xb')],'type':_0xff04('0xc')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x1bfa7e,_0x28b702,_0x44b4dd){var _0x3cf856=_0x825439[_0xff04('0xd')];var _0x3a7324=_0x1bfa7e['get']({'plain':!![]});if(_0x3a7324['direction'][_0xff04('0xe')]()==='in'||_0x3a7324[_0xff04('0xf')]['toLowerCase']()==='out'&&!_0x3a7324[_0xff04('0x10')]&&!_['isNil'](_0x3a7324[_0xff04('0x11')])){_0x3cf856[_0xff04('0x12')]['findOne']({'where':{'id':_0x3a7324['FaxInteractionId']}})[_0xff04('0x13')](function(_0x1c5935){if(_0x1c5935){_0x1c5935[_0xff04('0x14')]({'lastMsgAt':_0x3a7324[_0xff04('0x15')],'lastMsgDirection':_0x3a7324['direction'][_0xff04('0xe')]()});}})[_0xff04('0x16')](function(_0x1110c3){console[_0xff04('0x17')](_0x1110c3);});}_0x44b4dd();}},'charset':_0xff04('0x18'),'collate':_0xff04('0x19')});};
\ No newline at end of file
+var _0x6d8c=['../../config/logger','api','moment','request-promise','path','rimraf','./faxMessage.attributes','define','FaxMessage','fax_messages','body','FULLTEXT','models','get','direction','toLowerCase','secret','UserId','findOne','FaxInteractionId','update','createdAt','error','lodash','util'];(function(_0x28947d,_0x4cc9c6){var _0x12d2ee=function(_0x3f38fc){while(--_0x3f38fc){_0x28947d['push'](_0x28947d['shift']());}};_0x12d2ee(++_0x4cc9c6);}(_0x6d8c,0xad));var _0xc6d8=function(_0x4b311d,_0x2b1679){_0x4b311d=_0x4b311d-0x0;var _0x88a8f8=_0x6d8c[_0x4b311d];return _0x88a8f8;};'use strict';var _=require(_0xc6d8('0x0'));var util=require(_0xc6d8('0x1'));var logger=require(_0xc6d8('0x2'))(_0xc6d8('0x3'));var moment=require(_0xc6d8('0x4'));var BPromise=require('bluebird');var rp=require(_0xc6d8('0x5'));var fs=require('fs');var path=require(_0xc6d8('0x6'));var rimraf=require(_0xc6d8('0x7'));var config=require('../../config/environment');var attributes=require(_0xc6d8('0x8'));module['exports']=function(_0x86d8be,_0x259392){return _0x86d8be[_0xc6d8('0x9')](_0xc6d8('0xa'),attributes,{'tableName':_0xc6d8('0xb'),'paranoid':![],'indexes':[{'name':'fti_fax_messages','fields':[_0xc6d8('0xc')],'type':_0xc6d8('0xd')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x49bab3,_0x36fa13,_0x537554){var _0x353b8e=_0x86d8be[_0xc6d8('0xe')];var _0x3926a3=_0x49bab3[_0xc6d8('0xf')]({'plain':!![]});if(_0x3926a3[_0xc6d8('0x10')][_0xc6d8('0x11')]()==='in'||_0x3926a3[_0xc6d8('0x10')]['toLowerCase']()==='out'&&!_0x3926a3[_0xc6d8('0x12')]&&!_['isNil'](_0x3926a3[_0xc6d8('0x13')])){_0x353b8e['FaxInteraction'][_0xc6d8('0x14')]({'where':{'id':_0x3926a3[_0xc6d8('0x15')]}})['then'](function(_0x283281){if(_0x283281){_0x283281[_0xc6d8('0x16')]({'lastMsgAt':_0x3926a3[_0xc6d8('0x17')],'lastMsgDirection':_0x3926a3[_0xc6d8('0x10')][_0xc6d8('0x11')]()});}})['catch'](function(_0x59788d){console[_0xc6d8('0x18')](_0x59788d);});}_0x537554();}},'charset':'utf8mb4','collate':'utf8mb4_unicode_ci'});};
\ No newline at end of file