05d1c25ebc3cf7c2419b476e49d8d8b22b903d53
[motion2.git] / server / api / cdr / cdr.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 _0x7880=['accountcode','calldate','disposition','dst','src','uniqueid','util','../../config/logger','api','moment','bluebird','request-promise','rimraf','../../config/environment','./cdr.attributes','exports','define','Cdr','cdr'];(function(_0xc315de,_0x5dc877){var _0x11a627=function(_0x4039d6){while(--_0x4039d6){_0xc315de['push'](_0xc315de['shift']());}};_0x11a627(++_0x5dc877);}(_0x7880,0x1f4));var _0x0788=function(_0xed58fb,_0x3ad96e){_0xed58fb=_0xed58fb-0x0;var _0x34ff8a=_0x7880[_0xed58fb];return _0x34ff8a;};'use strict';var _=require('lodash');var util=require(_0x0788('0x0'));var logger=require(_0x0788('0x1'))(_0x0788('0x2'));var moment=require(_0x0788('0x3'));var BPromise=require(_0x0788('0x4'));var rp=require(_0x0788('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x0788('0x6'));var config=require(_0x0788('0x7'));var attributes=require(_0x0788('0x8'));module[_0x0788('0x9')]=function(_0x262f5c,_0x775629){return _0x262f5c[_0x0788('0xa')](_0x0788('0xb'),attributes,{'tableName':_0x0788('0xc'),'paranoid':![],'indexes':[{'name':_0x0788('0xd'),'fields':['accountcode']},{'name':_0x0788('0xe'),'fields':['calldate']},{'name':_0x0788('0xf'),'fields':['disposition']},{'name':_0x0788('0x10'),'fields':[_0x0788('0x10')]},{'name':_0x0788('0x11'),'fields':[_0x0788('0x11')]},{'name':_0x0788('0x12'),'fields':['uniqueid']}],'timestamps':![]});};