Built motion from commit e0fa946e.|2.6.5
[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 _0x445e=['utf8mb4','utf8mb4_unicode_ci','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','lodash','api','moment','request-promise','rimraf','./openchannelInteraction.attributes','exports','define','OpenchannelInteraction','openchannel_interactions'];(function(_0x281519,_0x2a10f7){var _0x7b1351=function(_0x4dfc8f){while(--_0x4dfc8f){_0x281519['push'](_0x281519['shift']());}};_0x7b1351(++_0x2a10f7);}(_0x445e,0xb9));var _0xe445=function(_0x577932,_0x3fafd9){_0x577932=_0x577932-0x0;var _0x1c5765=_0x445e[_0x577932];return _0x1c5765;};'use strict';var _=require(_0xe445('0x0'));var util=require('util');var logger=require('../../config/logger')(_0xe445('0x1'));var moment=require(_0xe445('0x2'));var BPromise=require('bluebird');var rp=require(_0xe445('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0xe445('0x4'));var config=require('../../config/environment');var attributes=require(_0xe445('0x5'));module[_0xe445('0x6')]=function(_0xf55e79,_0x189d00){return _0xf55e79[_0xe445('0x7')](_0xe445('0x8'),attributes,{'tableName':_0xe445('0x9'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xe445('0xa'),'collate':_0xe445('0xb'),'hooks':{'beforeUpdate':function(_0x3bb0d8,_0x330afe,_0x255797){if(_0x3bb0d8['changed']('closed')){_0x3bb0d8[_0xe445('0xc')]=moment()[_0xe445('0xd')](_0xe445('0xe'));}_0x255797(null,_0x3bb0d8);}}});};