3cb1908d28c672f3ef056734a92196f36346d1d8
[motion2.git] / server / api / openchannelInteraction / openchannelInteraction.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 _0x04b1=['lodash','util','../../config/logger','api','request-promise','rimraf','../../config/environment','./openchannelInteraction.attributes','exports','define','OpenchannelInteraction','openchannel_interactions','utf8mb4','utf8mb4_unicode_ci','changed','closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss'];(function(_0x1a0c32,_0x30a902){var _0x1f0f0e=function(_0x2a639b){while(--_0x2a639b){_0x1a0c32['push'](_0x1a0c32['shift']());}};_0x1f0f0e(++_0x30a902);}(_0x04b1,0x98));var _0x104b=function(_0x256d6a,_0x2f002f){_0x256d6a=_0x256d6a-0x0;var _0x460058=_0x04b1[_0x256d6a];return _0x460058;};'use strict';var _=require(_0x104b('0x0'));var util=require(_0x104b('0x1'));var logger=require(_0x104b('0x2'))(_0x104b('0x3'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x104b('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x104b('0x5'));var config=require(_0x104b('0x6'));var attributes=require(_0x104b('0x7'));module[_0x104b('0x8')]=function(_0x425e35,_0x3cc8e7){return _0x425e35[_0x104b('0x9')](_0x104b('0xa'),attributes,{'tableName':_0x104b('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x104b('0xc'),'collate':_0x104b('0xd'),'hooks':{'beforeUpdate':function(_0x31e6ec,_0x36ace2,_0x4c7596){if(_0x31e6ec[_0x104b('0xe')](_0x104b('0xf'))){_0x31e6ec[_0x104b('0x10')]=moment()[_0x104b('0x11')](_0x104b('0x12'));}_0x4c7596(null,_0x31e6ec);}}});};