Built motion from commit c738b9ac.|2.6.25
[motion2.git] / server / api / whatsappInteraction / whatsappInteraction.model.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and   *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0xc70f=['exports','define','WhatsappInteraction','whatsapp_interactions','format','YYYY-MM-DD\x20HH:mm:ss','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./whatsappInteraction.attributes'];(function(_0x342baa,_0x4a110f){var _0x1208f3=function(_0x56a645){while(--_0x56a645){_0x342baa['push'](_0x342baa['shift']());}};_0x1208f3(++_0x4a110f);}(_0xc70f,0x18d));var _0xfc70=function(_0x3f4e08,_0x2eb9ac){_0x3f4e08=_0x3f4e08-0x0;var _0x353f18=_0xc70f[_0x3f4e08];return _0x353f18;};'use strict';var _=require(_0xfc70('0x0'));var util=require(_0xfc70('0x1'));var logger=require(_0xfc70('0x2'))(_0xfc70('0x3'));var moment=require(_0xfc70('0x4'));var BPromise=require(_0xfc70('0x5'));var rp=require(_0xfc70('0x6'));var fs=require('fs');var path=require(_0xfc70('0x7'));var rimraf=require(_0xfc70('0x8'));var config=require(_0xfc70('0x9'));var attributes=require(_0xfc70('0xa'));module[_0xfc70('0xb')]=function(_0x4d7f65,_0x8e8bdb){return _0x4d7f65[_0xfc70('0xc')](_0xfc70('0xd'),attributes,{'tableName':_0xfc70('0xe'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x1289e8,_0x1f74dd,_0x11337e){if(_0x1289e8['changed']('closed')){_0x1289e8['closedAt']=moment()[_0xfc70('0xf')](_0xfc70('0x10'));}_0x11337e(null,_0x1289e8);}}});};