9bc1a6c217df7a37125b4572d3a28f814357db49
[motion2.git] / server / api / squareReport / squareReport.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 _0xf4de=['api','bluebird','path','rimraf','exports','SquareReport','report_square','uniqueid','project_name','leaveAt','lodash','../../config/logger'];(function(_0x59f9a5,_0x3515b6){var _0x193c75=function(_0x38095b){while(--_0x38095b){_0x59f9a5['push'](_0x59f9a5['shift']());}};_0x193c75(++_0x3515b6);}(_0xf4de,0x196));var _0xef4d=function(_0x3a7435,_0x6b173d){_0x3a7435=_0x3a7435-0x0;var _0x40ae81=_0xf4de[_0x3a7435];return _0x40ae81;};'use strict';var _=require(_0xef4d('0x0'));var util=require('util');var logger=require(_0xef4d('0x1'))(_0xef4d('0x2'));var moment=require('moment');var BPromise=require(_0xef4d('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xef4d('0x4'));var rimraf=require(_0xef4d('0x5'));var config=require('../../config/environment');var attributes=require('./squareReport.attributes');module[_0xef4d('0x6')]=function(_0x90f29e,_0x333dbd){return _0x90f29e['define'](_0xef4d('0x7'),attributes,{'tableName':_0xef4d('0x8'),'paranoid':![],'indexes':[{'name':'uid_pname','fields':[_0xef4d('0x9'),_0xef4d('0xa')]},{'name':_0xef4d('0xb'),'fields':[_0xef4d('0xb')]}],'timestamps':!![]});};