Built motion from commit (unavailable).|2.5.30
[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 _0x8c29=['changed','closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','lodash','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./whatsappInteraction.attributes','define','WhatsappInteraction'];(function(_0x399099,_0x2b7ef3){var _0x4e4912=function(_0x4ec1f7){while(--_0x4ec1f7){_0x399099['push'](_0x399099['shift']());}};_0x4e4912(++_0x2b7ef3);}(_0x8c29,0x18c));var _0x98c2=function(_0x318e31,_0x1d1574){_0x318e31=_0x318e31-0x0;var _0x351079=_0x8c29[_0x318e31];return _0x351079;};'use strict';var _=require(_0x98c2('0x0'));var util=require('util');var logger=require(_0x98c2('0x1'))(_0x98c2('0x2'));var moment=require(_0x98c2('0x3'));var BPromise=require(_0x98c2('0x4'));var rp=require(_0x98c2('0x5'));var fs=require('fs');var path=require(_0x98c2('0x6'));var rimraf=require(_0x98c2('0x7'));var config=require(_0x98c2('0x8'));var attributes=require(_0x98c2('0x9'));module['exports']=function(_0x571441,_0x1f516a){return _0x571441[_0x98c2('0xa')](_0x98c2('0xb'),attributes,{'tableName':'whatsapp_interactions','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x315bb7,_0xcc1423,_0x258ae9){if(_0x315bb7[_0x98c2('0xc')](_0x98c2('0xd'))){_0x315bb7[_0x98c2('0xe')]=moment()[_0x98c2('0xf')](_0x98c2('0x10'));}_0x258ae9(null,_0x315bb7);}}});};