Built motion from commit (unavailable).|2.5.4
[motion2.git] / server / api / faxMessage / faxMessage.model.js
index abfb7d6..e992145 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xab02=['utf8mb4','utf8mb4_unicode_ci','lodash','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./faxMessage.attributes','define','FaxMessage','fti_fax_messages','FULLTEXT','models','direction','toLowerCase','out','isNil','UserId','FaxInteraction','findOne','FaxInteractionId','then','createdAt','error'];(function(_0x1c9aa0,_0x2ec0f5){var _0x1419f2=function(_0x194acf){while(--_0x194acf){_0x1c9aa0['push'](_0x1c9aa0['shift']());}};_0x1419f2(++_0x2ec0f5);}(_0xab02,0x18a));var _0x2ab0=function(_0x2db7f6,_0x44831c){_0x2db7f6=_0x2db7f6-0x0;var _0x2c1d45=_0xab02[_0x2db7f6];return _0x2c1d45;};'use strict';var _=require(_0x2ab0('0x0'));var util=require('util');var logger=require(_0x2ab0('0x1'))(_0x2ab0('0x2'));var moment=require(_0x2ab0('0x3'));var BPromise=require(_0x2ab0('0x4'));var rp=require(_0x2ab0('0x5'));var fs=require('fs');var path=require(_0x2ab0('0x6'));var rimraf=require(_0x2ab0('0x7'));var config=require(_0x2ab0('0x8'));var attributes=require(_0x2ab0('0x9'));module['exports']=function(_0x59bf51,_0x3b5be9){return _0x59bf51[_0x2ab0('0xa')](_0x2ab0('0xb'),attributes,{'tableName':'fax_messages','paranoid':![],'indexes':[{'name':_0x2ab0('0xc'),'fields':['body'],'type':_0x2ab0('0xd')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x4ae494,_0x186075,_0x87545b){var _0x5e27c5=_0x59bf51[_0x2ab0('0xe')];var _0x4afcb8=_0x4ae494['get']({'plain':!![]});if(_0x4afcb8[_0x2ab0('0xf')][_0x2ab0('0x10')]()==='in'||_0x4afcb8[_0x2ab0('0xf')][_0x2ab0('0x10')]()===_0x2ab0('0x11')&&!_0x4afcb8['secret']&&!_[_0x2ab0('0x12')](_0x4afcb8[_0x2ab0('0x13')])){_0x5e27c5[_0x2ab0('0x14')][_0x2ab0('0x15')]({'where':{'id':_0x4afcb8[_0x2ab0('0x16')]}})[_0x2ab0('0x17')](function(_0x8d9781){if(_0x8d9781){_0x8d9781['update']({'lastMsgAt':_0x4afcb8[_0x2ab0('0x18')],'lastMsgDirection':_0x4afcb8['direction'][_0x2ab0('0x10')]()});}})['catch'](function(_0x3628c7){console[_0x2ab0('0x19')](_0x3628c7);});}_0x87545b();}},'charset':_0x2ab0('0x1a'),'collate':_0x2ab0('0x1b')});};
\ No newline at end of file
+var _0xb50e=['FULLTEXT','models','toLowerCase','direction','out','isNil','UserId','FaxInteraction','findOne','FaxInteractionId','then','createdAt','catch','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','./faxMessage.attributes','define','body'];(function(_0x1a2a4c,_0x177909){var _0x4e0d5b=function(_0x132e1b){while(--_0x132e1b){_0x1a2a4c['push'](_0x1a2a4c['shift']());}};_0x4e0d5b(++_0x177909);}(_0xb50e,0xb5));var _0xeb50=function(_0x4ef8bc,_0x5eb00d){_0x4ef8bc=_0x4ef8bc-0x0;var _0x5d4d56=_0xb50e[_0x4ef8bc];return _0x5d4d56;};'use strict';var _=require('lodash');var util=require(_0xeb50('0x0'));var logger=require(_0xeb50('0x1'))(_0xeb50('0x2'));var moment=require(_0xeb50('0x3'));var BPromise=require(_0xeb50('0x4'));var rp=require(_0xeb50('0x5'));var fs=require('fs');var path=require(_0xeb50('0x6'));var rimraf=require(_0xeb50('0x7'));var config=require('../../config/environment');var attributes=require(_0xeb50('0x8'));module['exports']=function(_0x44ba26,_0x394077){return _0x44ba26[_0xeb50('0x9')]('FaxMessage',attributes,{'tableName':'fax_messages','paranoid':![],'indexes':[{'name':'fti_fax_messages','fields':[_0xeb50('0xa')],'type':_0xeb50('0xb')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x5f429c,_0x95b494,_0x2597f3){var _0x5b9965=_0x44ba26[_0xeb50('0xc')];var _0x50a1a9=_0x5f429c['get']({'plain':!![]});if(_0x50a1a9['direction'][_0xeb50('0xd')]()==='in'||_0x50a1a9[_0xeb50('0xe')][_0xeb50('0xd')]()===_0xeb50('0xf')&&!_0x50a1a9['secret']&&!_[_0xeb50('0x10')](_0x50a1a9[_0xeb50('0x11')])){_0x5b9965[_0xeb50('0x12')][_0xeb50('0x13')]({'where':{'id':_0x50a1a9[_0xeb50('0x14')]}})[_0xeb50('0x15')](function(_0x914922){if(_0x914922){_0x914922['update']({'lastMsgAt':_0x50a1a9[_0xeb50('0x16')],'lastMsgDirection':_0x50a1a9[_0xeb50('0xe')][_0xeb50('0xd')]()});}})[_0xeb50('0x17')](function(_0x5a33ed){console['error'](_0x5a33ed);});}_0x2597f3();}},'charset':'utf8mb4','collate':'utf8mb4_unicode_ci'});};
\ No newline at end of file