Built motion from commit a679711e.|2.6.15
[motion2.git] / server / api / faxMessage / faxMessage.model.js
index 4fdc73c..fd16a9a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3bdc=['FULLTEXT','get','direction','toLowerCase','out','secret','isNil','UserId','FaxInteraction','FaxInteractionId','then','update','createdAt','catch','error','utf8mb4','utf8mb4_unicode_ci','util','api','moment','rimraf','../../config/environment','./faxMessage.attributes','define','fax_messages','fti_fax_messages'];(function(_0xed2649,_0x1d8bee){var _0x36f471=function(_0xc498dc){while(--_0xc498dc){_0xed2649['push'](_0xed2649['shift']());}};_0x36f471(++_0x1d8bee);}(_0x3bdc,0x79));var _0xc3bd=function(_0x218915,_0x39a16c){_0x218915=_0x218915-0x0;var _0x57eb25=_0x3bdc[_0x218915];return _0x57eb25;};'use strict';var _=require('lodash');var util=require(_0xc3bd('0x0'));var logger=require('../../config/logger')(_0xc3bd('0x1'));var moment=require(_0xc3bd('0x2'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0xc3bd('0x3'));var config=require(_0xc3bd('0x4'));var attributes=require(_0xc3bd('0x5'));module['exports']=function(_0x430320,_0x1bdd0a){return _0x430320[_0xc3bd('0x6')]('FaxMessage',attributes,{'tableName':_0xc3bd('0x7'),'paranoid':![],'indexes':[{'name':_0xc3bd('0x8'),'fields':['body'],'type':_0xc3bd('0x9')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x1afbb8,_0x5b3cdf,_0x2e3fec){var _0x11589e=_0x430320['models'];var _0x264a0e=_0x1afbb8[_0xc3bd('0xa')]({'plain':!![]});if(_0x264a0e[_0xc3bd('0xb')][_0xc3bd('0xc')]()==='in'||_0x264a0e[_0xc3bd('0xb')][_0xc3bd('0xc')]()===_0xc3bd('0xd')&&!_0x264a0e[_0xc3bd('0xe')]&&!_[_0xc3bd('0xf')](_0x264a0e[_0xc3bd('0x10')])){_0x11589e[_0xc3bd('0x11')]['findOne']({'where':{'id':_0x264a0e[_0xc3bd('0x12')]}})[_0xc3bd('0x13')](function(_0x5d07f8){if(_0x5d07f8){_0x5d07f8[_0xc3bd('0x14')]({'lastMsgAt':_0x264a0e[_0xc3bd('0x15')],'lastMsgDirection':_0x264a0e[_0xc3bd('0xb')][_0xc3bd('0xc')]()});}})[_0xc3bd('0x16')](function(_0x369cfc){console[_0xc3bd('0x17')](_0x369cfc);});}_0x2e3fec();}},'charset':_0xc3bd('0x18'),'collate':_0xc3bd('0x19')});};
\ No newline at end of file
+var _0x4acd=['get','toLowerCase','direction','out','UserId','findOne','FaxInteractionId','update','createdAt','error','lodash','util','../../config/logger','api','moment','request-promise','path','../../config/environment','exports','define','FaxMessage','fax_messages','fti_fax_messages','body','models'];(function(_0x910c0d,_0x4e8521){var _0x5d3b32=function(_0x4a0f76){while(--_0x4a0f76){_0x910c0d['push'](_0x910c0d['shift']());}};_0x5d3b32(++_0x4e8521);}(_0x4acd,0x1b3));var _0xd4ac=function(_0x999b85,_0x1edc2b){_0x999b85=_0x999b85-0x0;var _0x1d7124=_0x4acd[_0x999b85];return _0x1d7124;};'use strict';var _=require(_0xd4ac('0x0'));var util=require(_0xd4ac('0x1'));var logger=require(_0xd4ac('0x2'))(_0xd4ac('0x3'));var moment=require(_0xd4ac('0x4'));var BPromise=require('bluebird');var rp=require(_0xd4ac('0x5'));var fs=require('fs');var path=require(_0xd4ac('0x6'));var rimraf=require('rimraf');var config=require(_0xd4ac('0x7'));var attributes=require('./faxMessage.attributes');module[_0xd4ac('0x8')]=function(_0x9370ae,_0x32d8f9){return _0x9370ae[_0xd4ac('0x9')](_0xd4ac('0xa'),attributes,{'tableName':_0xd4ac('0xb'),'paranoid':![],'indexes':[{'name':_0xd4ac('0xc'),'fields':[_0xd4ac('0xd')],'type':'FULLTEXT'}],'timestamps':!![],'hooks':{'afterCreate':function(_0x5195d6,_0x2e358f,_0x331774){var _0x3061f2=_0x9370ae[_0xd4ac('0xe')];var _0x3649fc=_0x5195d6[_0xd4ac('0xf')]({'plain':!![]});if(_0x3649fc['direction'][_0xd4ac('0x10')]()==='in'||_0x3649fc[_0xd4ac('0x11')][_0xd4ac('0x10')]()===_0xd4ac('0x12')&&!_0x3649fc['secret']&&!_['isNil'](_0x3649fc[_0xd4ac('0x13')])){_0x3061f2['FaxInteraction'][_0xd4ac('0x14')]({'where':{'id':_0x3649fc[_0xd4ac('0x15')]}})['then'](function(_0x28130d){if(_0x28130d){_0x28130d[_0xd4ac('0x16')]({'lastMsgAt':_0x3649fc[_0xd4ac('0x17')],'lastMsgDirection':_0x3649fc[_0xd4ac('0x11')][_0xd4ac('0x10')]()});}})['catch'](function(_0x3bdadd){console[_0xd4ac('0x18')](_0x3bdadd);});}_0x331774();}},'charset':'utf8mb4','collate':'utf8mb4_unicode_ci'});};
\ No newline at end of file