Built motion from commit e02f907f.|2.6.14
[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 _0x2869=['YYYY-MM-DD\x20HH:mm:ss','util','bluebird','request-promise','path','rimraf','./openchannelInteraction.attributes','exports','define','OpenchannelInteraction','openchannel_interactions','utf8mb4','utf8mb4_unicode_ci','changed','closed','closedAt','format'];(function(_0x348cbe,_0x40aab6){var _0x1b8dd0=function(_0xd372c5){while(--_0xd372c5){_0x348cbe['push'](_0x348cbe['shift']());}};_0x1b8dd0(++_0x40aab6);}(_0x2869,0x199));var _0x9286=function(_0x11f0d7,_0x441c58){_0x11f0d7=_0x11f0d7-0x0;var _0xb86f80=_0x2869[_0x11f0d7];return _0xb86f80;};'use strict';var _=require('lodash');var util=require(_0x9286('0x0'));var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require(_0x9286('0x1'));var rp=require(_0x9286('0x2'));var fs=require('fs');var path=require(_0x9286('0x3'));var rimraf=require(_0x9286('0x4'));var config=require('../../config/environment');var attributes=require(_0x9286('0x5'));module[_0x9286('0x6')]=function(_0xe53cbd,_0x2761ce){return _0xe53cbd[_0x9286('0x7')](_0x9286('0x8'),attributes,{'tableName':_0x9286('0x9'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x9286('0xa'),'collate':_0x9286('0xb'),'hooks':{'beforeUpdate':function(_0x52049c,_0x5464ff,_0x615a19){if(_0x52049c[_0x9286('0xc')](_0x9286('0xd'))){_0x52049c[_0x9286('0xe')]=moment()[_0x9286('0xf')](_0x9286('0x10'));}_0x615a19(null,_0x52049c);}}});};