Built motion from commit 7158bc59.|2.5.42
[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 _0x19e7=['request-promise','path','rimraf','../../config/environment','./openchannelInteraction.attributes','exports','define','OpenchannelInteraction','openchannel_interactions','utf8mb4','utf8mb4_unicode_ci','closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','util','../../config/logger','api','moment','bluebird'];(function(_0x58afd5,_0x534a48){var _0x3e503b=function(_0x27ba44){while(--_0x27ba44){_0x58afd5['push'](_0x58afd5['shift']());}};_0x3e503b(++_0x534a48);}(_0x19e7,0xd7));var _0x719e=function(_0xdd65b,_0x2b4b71){_0xdd65b=_0xdd65b-0x0;var _0x10cb9a=_0x19e7[_0xdd65b];return _0x10cb9a;};'use strict';var _=require('lodash');var util=require(_0x719e('0x0'));var logger=require(_0x719e('0x1'))(_0x719e('0x2'));var moment=require(_0x719e('0x3'));var BPromise=require(_0x719e('0x4'));var rp=require(_0x719e('0x5'));var fs=require('fs');var path=require(_0x719e('0x6'));var rimraf=require(_0x719e('0x7'));var config=require(_0x719e('0x8'));var attributes=require(_0x719e('0x9'));module[_0x719e('0xa')]=function(_0x5bc651,_0x2f2ba8){return _0x5bc651[_0x719e('0xb')](_0x719e('0xc'),attributes,{'tableName':_0x719e('0xd'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x719e('0xe'),'collate':_0x719e('0xf'),'hooks':{'beforeUpdate':function(_0x517210,_0x58bd05,_0x5a6c81){if(_0x517210['changed'](_0x719e('0x10'))){_0x517210[_0x719e('0x11')]=moment()[_0x719e('0x12')](_0x719e('0x13'));}_0x5a6c81(null,_0x517210);}}});};