Built motion from commit caf7d5f0.|2.5.39
[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 _0x7f9e=['lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf','../../config/environment','./openchannelInteraction.attributes','exports','define','openchannel_interactions','utf8mb4','changed','closed','format','YYYY-MM-DD\x20HH:mm:ss'];(function(_0x792e6b,_0x1949c4){var _0x1627c2=function(_0xa89bb1){while(--_0xa89bb1){_0x792e6b['push'](_0x792e6b['shift']());}};_0x1627c2(++_0x1949c4);}(_0x7f9e,0x90));var _0xe7f9=function(_0x46f1a6,_0xc7a582){_0x46f1a6=_0x46f1a6-0x0;var _0x38429a=_0x7f9e[_0x46f1a6];return _0x38429a;};'use strict';var _=require(_0xe7f9('0x0'));var util=require(_0xe7f9('0x1'));var logger=require(_0xe7f9('0x2'))(_0xe7f9('0x3'));var moment=require('moment');var BPromise=require(_0xe7f9('0x4'));var rp=require(_0xe7f9('0x5'));var fs=require('fs');var path=require(_0xe7f9('0x6'));var rimraf=require(_0xe7f9('0x7'));var config=require(_0xe7f9('0x8'));var attributes=require(_0xe7f9('0x9'));module[_0xe7f9('0xa')]=function(_0xe8ff46,_0x4aa7db){return _0xe8ff46[_0xe7f9('0xb')]('OpenchannelInteraction',attributes,{'tableName':_0xe7f9('0xc'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xe7f9('0xd'),'collate':'utf8mb4_unicode_ci','hooks':{'beforeUpdate':function(_0x1a0fc2,_0x456a80,_0x38e304){if(_0x1a0fc2[_0xe7f9('0xe')](_0xe7f9('0xf'))){_0x1a0fc2['closedAt']=moment()[_0xe7f9('0x10')](_0xe7f9('0x11'));}_0x38e304(null,_0x1a0fc2);}}});};