Built motion from commit bab6f49e.|2.6.17
[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 _0xc17d=['whatsapp_interactions','changed','closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf','./whatsappInteraction.attributes','WhatsappInteraction'];(function(_0x5b644e,_0x2e5e07){var _0x49c6bf=function(_0x3032d9){while(--_0x3032d9){_0x5b644e['push'](_0x5b644e['shift']());}};_0x49c6bf(++_0x2e5e07);}(_0xc17d,0x96));var _0xdc17=function(_0x3c128a,_0x10997c){_0x3c128a=_0x3c128a-0x0;var _0x497bad=_0xc17d[_0x3c128a];return _0x497bad;};'use strict';var _=require(_0xdc17('0x0'));var util=require(_0xdc17('0x1'));var logger=require(_0xdc17('0x2'))(_0xdc17('0x3'));var moment=require('moment');var BPromise=require(_0xdc17('0x4'));var rp=require(_0xdc17('0x5'));var fs=require('fs');var path=require(_0xdc17('0x6'));var rimraf=require(_0xdc17('0x7'));var config=require('../../config/environment');var attributes=require(_0xdc17('0x8'));module['exports']=function(_0x47ba52,_0x44f7d0){return _0x47ba52['define'](_0xdc17('0x9'),attributes,{'tableName':_0xdc17('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x53143d,_0x5ccdc5,_0x144cac){if(_0x53143d[_0xdc17('0xb')](_0xdc17('0xc'))){_0x53143d[_0xdc17('0xd')]=moment()[_0xdc17('0xe')](_0xdc17('0xf'));}_0x144cac(null,_0x53143d);}}});};