Built motion from commit 616d3211.|2.6.4
[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 _0x7417=['OpenchannelInteraction','openchannel_interactions','utf8mb4','utf8mb4_unicode_ci','changed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','lodash','util','../../config/logger','api','moment','bluebird','path','../../config/environment','./openchannelInteraction.attributes','exports','define'];(function(_0x213ee1,_0x33e443){var _0x1c4d47=function(_0x3132b0){while(--_0x3132b0){_0x213ee1['push'](_0x213ee1['shift']());}};_0x1c4d47(++_0x33e443);}(_0x7417,0x112));var _0x7741=function(_0x432682,_0x253044){_0x432682=_0x432682-0x0;var _0x463d05=_0x7417[_0x432682];return _0x463d05;};'use strict';var _=require(_0x7741('0x0'));var util=require(_0x7741('0x1'));var logger=require(_0x7741('0x2'))(_0x7741('0x3'));var moment=require(_0x7741('0x4'));var BPromise=require(_0x7741('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x7741('0x6'));var rimraf=require('rimraf');var config=require(_0x7741('0x7'));var attributes=require(_0x7741('0x8'));module[_0x7741('0x9')]=function(_0x291bb0,_0x21c5a3){return _0x291bb0[_0x7741('0xa')](_0x7741('0xb'),attributes,{'tableName':_0x7741('0xc'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x7741('0xd'),'collate':_0x7741('0xe'),'hooks':{'beforeUpdate':function(_0x35f8b1,_0xc0707d,_0xaea5cc){if(_0x35f8b1[_0x7741('0xf')]('closed')){_0x35f8b1[_0x7741('0x10')]=moment()[_0x7741('0x11')](_0x7741('0x12'));}_0xaea5cc(null,_0x35f8b1);}}});};