Built motion from commit 4ca75f1b.|2.6.28
[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 _0x7850=['rimraf','../../config/environment','./openchannelInteraction.attributes','exports','define','OpenchannelInteraction','openchannel_interactions','utf8mb4','utf8mb4_unicode_ci','changed','closed','closedAt','format','lodash','util','../../config/logger','bluebird','request-promise'];(function(_0x574d9b,_0x2063da){var _0x31d2a5=function(_0x97ce4c){while(--_0x97ce4c){_0x574d9b['push'](_0x574d9b['shift']());}};_0x31d2a5(++_0x2063da);}(_0x7850,0x1e1));var _0x0785=function(_0xd15d2b,_0x4f87fb){_0xd15d2b=_0xd15d2b-0x0;var _0x300111=_0x7850[_0xd15d2b];return _0x300111;};'use strict';var _=require(_0x0785('0x0'));var util=require(_0x0785('0x1'));var logger=require(_0x0785('0x2'))('api');var moment=require('moment');var BPromise=require(_0x0785('0x3'));var rp=require(_0x0785('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x0785('0x5'));var config=require(_0x0785('0x6'));var attributes=require(_0x0785('0x7'));module[_0x0785('0x8')]=function(_0x25662e,_0x564bb5){return _0x25662e[_0x0785('0x9')](_0x0785('0xa'),attributes,{'tableName':_0x0785('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x0785('0xc'),'collate':_0x0785('0xd'),'hooks':{'beforeUpdate':function(_0x3e0c72,_0x454281,_0x436034){if(_0x3e0c72[_0x0785('0xe')](_0x0785('0xf'))){_0x3e0c72[_0x0785('0x10')]=moment()[_0x0785('0x11')]('YYYY-MM-DD\x20HH:mm:ss');}_0x436034(null,_0x3e0c72);}}});};