Built motion from commit ab870f9e.|2.5.44
[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 _0xe941=['utf8mb4_unicode_ci','changed','closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','util','../../config/logger','api','moment','bluebird','path','rimraf','../../config/environment','./openchannelInteraction.attributes','exports','define','OpenchannelInteraction','utf8mb4'];(function(_0x2cfb58,_0x3d9412){var _0xd99951=function(_0x329afa){while(--_0x329afa){_0x2cfb58['push'](_0x2cfb58['shift']());}};_0xd99951(++_0x3d9412);}(_0xe941,0xc4));var _0x1e94=function(_0x4cf98e,_0xba4b79){_0x4cf98e=_0x4cf98e-0x0;var _0x1623ac=_0xe941[_0x4cf98e];return _0x1623ac;};'use strict';var _=require('lodash');var util=require(_0x1e94('0x0'));var logger=require(_0x1e94('0x1'))(_0x1e94('0x2'));var moment=require(_0x1e94('0x3'));var BPromise=require(_0x1e94('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x1e94('0x5'));var rimraf=require(_0x1e94('0x6'));var config=require(_0x1e94('0x7'));var attributes=require(_0x1e94('0x8'));module[_0x1e94('0x9')]=function(_0xb5aa55,_0x501440){return _0xb5aa55[_0x1e94('0xa')](_0x1e94('0xb'),attributes,{'tableName':'openchannel_interactions','paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x1e94('0xc'),'collate':_0x1e94('0xd'),'hooks':{'beforeUpdate':function(_0x48e23e,_0x11ae7b,_0x5199b0){if(_0x48e23e[_0x1e94('0xe')](_0x1e94('0xf'))){_0x48e23e[_0x1e94('0x10')]=moment()[_0x1e94('0x11')](_0x1e94('0x12'));}_0x5199b0(null,_0x48e23e);}}});};