Built motion from commit 3c2ce842.|2.6.31
[motion2.git] / server / api / faxMessage / faxMessage.model.js
index cd3a0b0..8531741 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8eb5=['bluebird','request-promise','path','rimraf','exports','define','FaxMessage','fax_messages','body','FULLTEXT','get','direction','toLowerCase','out','UserId','FaxInteraction','findOne','FaxInteractionId','then','update','createdAt','error','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','api','moment'];(function(_0x211e4a,_0x581fb6){var _0x2c90ce=function(_0x40f214){while(--_0x40f214){_0x211e4a['push'](_0x211e4a['shift']());}};_0x2c90ce(++_0x581fb6);}(_0x8eb5,0x13a));var _0x58eb=function(_0x4b8b50,_0x5bb788){_0x4b8b50=_0x4b8b50-0x0;var _0x3d5b6c=_0x8eb5[_0x4b8b50];return _0x3d5b6c;};'use strict';var _=require(_0x58eb('0x0'));var util=require(_0x58eb('0x1'));var logger=require(_0x58eb('0x2'))(_0x58eb('0x3'));var moment=require(_0x58eb('0x4'));var BPromise=require(_0x58eb('0x5'));var rp=require(_0x58eb('0x6'));var fs=require('fs');var path=require(_0x58eb('0x7'));var rimraf=require(_0x58eb('0x8'));var config=require('../../config/environment');var attributes=require('./faxMessage.attributes');module[_0x58eb('0x9')]=function(_0xe91de1,_0x17deba){return _0xe91de1[_0x58eb('0xa')](_0x58eb('0xb'),attributes,{'tableName':_0x58eb('0xc'),'paranoid':![],'indexes':[{'name':'fti_fax_messages','fields':[_0x58eb('0xd')],'type':_0x58eb('0xe')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x1c2401,_0x5cc132,_0x79ec8a){var _0x2d1e93=_0xe91de1['models'];var _0x3f736b=_0x1c2401[_0x58eb('0xf')]({'plain':!![]});if(_0x3f736b[_0x58eb('0x10')][_0x58eb('0x11')]()==='in'||_0x3f736b[_0x58eb('0x10')][_0x58eb('0x11')]()===_0x58eb('0x12')&&!_0x3f736b['secret']&&!_['isNil'](_0x3f736b[_0x58eb('0x13')])){_0x2d1e93[_0x58eb('0x14')][_0x58eb('0x15')]({'where':{'id':_0x3f736b[_0x58eb('0x16')]}})[_0x58eb('0x17')](function(_0x33c477){if(_0x33c477){_0x33c477[_0x58eb('0x18')]({'lastMsgAt':_0x3f736b[_0x58eb('0x19')],'lastMsgDirection':_0x3f736b[_0x58eb('0x10')][_0x58eb('0x11')]()});}})['catch'](function(_0xac5127){console[_0x58eb('0x1a')](_0xac5127);});}_0x79ec8a();}},'charset':_0x58eb('0x1b'),'collate':_0x58eb('0x1c')});};
\ No newline at end of file
+var _0xf772=['direction','toLowerCase','out','secret','FaxInteraction','findOne','FaxInteractionId','update','createdAt','catch','utf8mb4','lodash','util','api','request-promise','path','../../config/environment','./faxMessage.attributes','exports','define','fax_messages','fti_fax_messages','body','FULLTEXT','models','get'];(function(_0x28ffee,_0x230a50){var _0x2b4cf1=function(_0x2be533){while(--_0x2be533){_0x28ffee['push'](_0x28ffee['shift']());}};_0x2b4cf1(++_0x230a50);}(_0xf772,0x143));var _0x2f77=function(_0xebc6bf,_0x457124){_0xebc6bf=_0xebc6bf-0x0;var _0x3cc4a5=_0xf772[_0xebc6bf];return _0x3cc4a5;};'use strict';var _=require(_0x2f77('0x0'));var util=require(_0x2f77('0x1'));var logger=require('../../config/logger')(_0x2f77('0x2'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x2f77('0x3'));var fs=require('fs');var path=require(_0x2f77('0x4'));var rimraf=require('rimraf');var config=require(_0x2f77('0x5'));var attributes=require(_0x2f77('0x6'));module[_0x2f77('0x7')]=function(_0x2149c1,_0x1d5c23){return _0x2149c1[_0x2f77('0x8')]('FaxMessage',attributes,{'tableName':_0x2f77('0x9'),'paranoid':![],'indexes':[{'name':_0x2f77('0xa'),'fields':[_0x2f77('0xb')],'type':_0x2f77('0xc')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x1a24bc,_0x4b11ec,_0x2bb6ea){var _0x202b69=_0x2149c1[_0x2f77('0xd')];var _0x46e56b=_0x1a24bc[_0x2f77('0xe')]({'plain':!![]});if(_0x46e56b[_0x2f77('0xf')][_0x2f77('0x10')]()==='in'||_0x46e56b['direction'][_0x2f77('0x10')]()===_0x2f77('0x11')&&!_0x46e56b[_0x2f77('0x12')]&&!_['isNil'](_0x46e56b['UserId'])){_0x202b69[_0x2f77('0x13')][_0x2f77('0x14')]({'where':{'id':_0x46e56b[_0x2f77('0x15')]}})['then'](function(_0x533076){if(_0x533076){_0x533076[_0x2f77('0x16')]({'lastMsgAt':_0x46e56b[_0x2f77('0x17')],'lastMsgDirection':_0x46e56b[_0x2f77('0xf')][_0x2f77('0x10')]()});}})[_0x2f77('0x18')](function(_0x1b51cb){console['error'](_0x1b51cb);});}_0x2bb6ea();}},'charset':_0x2f77('0x19'),'collate':'utf8mb4_unicode_ci'});};
\ No newline at end of file