e850eec4f09489441d5a32b1eecd4c6708446378
[motion2.git] / server / api / chatInteraction / chatInteraction.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 _0x4faa=['rimraf','../../config/environment','./chatInteraction.attributes','exports','define','ChatInteraction','chat_interactions','changed','closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','moment','bluebird','request-promise','path'];(function(_0x43ef1d,_0x3a4978){var _0x1a23b0=function(_0x55e7d2){while(--_0x55e7d2){_0x43ef1d['push'](_0x43ef1d['shift']());}};_0x1a23b0(++_0x3a4978);}(_0x4faa,0x149));var _0xa4fa=function(_0x2160a9,_0x3cbd9e){_0x2160a9=_0x2160a9-0x0;var _0xa88cf7=_0x4faa[_0x2160a9];return _0xa88cf7;};'use strict';var _=require(_0xa4fa('0x0'));var util=require(_0xa4fa('0x1'));var logger=require(_0xa4fa('0x2'))('api');var moment=require(_0xa4fa('0x3'));var BPromise=require(_0xa4fa('0x4'));var rp=require(_0xa4fa('0x5'));var fs=require('fs');var path=require(_0xa4fa('0x6'));var rimraf=require(_0xa4fa('0x7'));var config=require(_0xa4fa('0x8'));var attributes=require(_0xa4fa('0x9'));module[_0xa4fa('0xa')]=function(_0xd1008,_0x97dbd){return _0xd1008[_0xa4fa('0xb')](_0xa4fa('0xc'),attributes,{'tableName':_0xa4fa('0xd'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x4e34f4,_0x2ff849,_0x3e9711){if(_0x4e34f4[_0xa4fa('0xe')](_0xa4fa('0xf'))){_0x4e34f4[_0xa4fa('0x10')]=moment()[_0xa4fa('0x11')](_0xa4fa('0x12'));}_0x3e9711(null,_0x4e34f4);}},'charset':_0xa4fa('0x13'),'collate':_0xa4fa('0x14')});};