9b88e73e05cf1752b7335a10292680f71d29e475
[motion2.git] / server / api / cmHopper / cmHopper.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 _0x7096=['phone','priority','util','../../config/logger','bluebird','path','../../config/environment','exports','CmHopper','cm_hopper','scheduledat'];(function(_0x501510,_0x61caa9){var _0x1e6ee5=function(_0x32845b){while(--_0x32845b){_0x501510['push'](_0x501510['shift']());}};_0x1e6ee5(++_0x61caa9);}(_0x7096,0x1ba));var _0x6709=function(_0xbca1b1,_0x33f0ce){_0xbca1b1=_0xbca1b1-0x0;var _0x4e1686=_0x7096[_0xbca1b1];return _0x4e1686;};'use strict';var _=require('lodash');var util=require(_0x6709('0x0'));var logger=require(_0x6709('0x1'))('api');var moment=require('moment');var BPromise=require(_0x6709('0x2'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x6709('0x3'));var rimraf=require('rimraf');var config=require(_0x6709('0x4'));var attributes=require('./cmHopper.attributes');module[_0x6709('0x5')]=function(_0x48bae8,_0x1ae329){return _0x48bae8['define'](_0x6709('0x6'),attributes,{'tableName':_0x6709('0x7'),'paranoid':![],'indexes':[{'name':'scheduledat','fields':[_0x6709('0x8')]},{'name':'phone','fields':[_0x6709('0x9')]},{'name':_0x6709('0xa'),'fields':[_0x6709('0xa')]}],'timestamps':!![]});};