Built motion from commit da617fac.|2.6.6
[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 _0x595d=['utf8mb4_unicode_ci','changed','closed','YYYY-MM-DD\x20HH:mm:ss','lodash','util','../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment','./openchannelInteraction.attributes','exports','define','OpenchannelInteraction','utf8mb4'];(function(_0x474bc0,_0x26989c){var _0x4b24cf=function(_0x4be866){while(--_0x4be866){_0x474bc0['push'](_0x474bc0['shift']());}};_0x4b24cf(++_0x26989c);}(_0x595d,0x82));var _0xd595=function(_0x3a6efd,_0x2a5102){_0x3a6efd=_0x3a6efd-0x0;var _0x487b9a=_0x595d[_0x3a6efd];return _0x487b9a;};'use strict';var _=require(_0xd595('0x0'));var util=require(_0xd595('0x1'));var logger=require(_0xd595('0x2'))('api');var moment=require(_0xd595('0x3'));var BPromise=require(_0xd595('0x4'));var rp=require(_0xd595('0x5'));var fs=require('fs');var path=require(_0xd595('0x6'));var rimraf=require(_0xd595('0x7'));var config=require(_0xd595('0x8'));var attributes=require(_0xd595('0x9'));module[_0xd595('0xa')]=function(_0x14f1d7,_0x2f096c){return _0x14f1d7[_0xd595('0xb')](_0xd595('0xc'),attributes,{'tableName':'openchannel_interactions','paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xd595('0xd'),'collate':_0xd595('0xe'),'hooks':{'beforeUpdate':function(_0x4217bd,_0x4d23b7,_0x3ac3fd){if(_0x4217bd[_0xd595('0xf')](_0xd595('0x10'))){_0x4217bd['closedAt']=moment()['format'](_0xd595('0x11'));}_0x3ac3fd(null,_0x4217bd);}}});};