Built motion from commit 616d3211.|2.6.4
[motion2.git] / server / api / disposition / disposition.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 _0x2539=['name','ListId','ChatWebsiteId','name_mail','MailAccountId','SmsAccountId','name_fax','FaxAccountId','name_openchannel','OpenchannelAccountId','WhatsappAccountId','util','request-promise','../../config/environment','./disposition.attributes','exports','define','Disposition','tools_dispositions'];(function(_0x311b4f,_0x1ab2d0){var _0x21cc5c=function(_0xf03138){while(--_0xf03138){_0x311b4f['push'](_0x311b4f['shift']());}};_0x21cc5c(++_0x1ab2d0);}(_0x2539,0x1e6));var _0x9253=function(_0x1a4f36,_0x112d97){_0x1a4f36=_0x1a4f36-0x0;var _0x2873a9=_0x2539[_0x1a4f36];return _0x2873a9;};'use strict';var _=require('lodash');var util=require(_0x9253('0x0'));var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x9253('0x1'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x9253('0x2'));var attributes=require(_0x9253('0x3'));module[_0x9253('0x4')]=function(_0xe6e39b,_0x48f983){return _0xe6e39b[_0x9253('0x5')](_0x9253('0x6'),attributes,{'tableName':_0x9253('0x7'),'paranoid':![],'indexes':[{'unique':!![],'name':'name_voice','fields':[_0x9253('0x8'),_0x9253('0x9')]},{'unique':!![],'name':'name_chat','fields':[_0x9253('0x8'),_0x9253('0xa')]},{'unique':!![],'name':_0x9253('0xb'),'fields':[_0x9253('0x8'),_0x9253('0xc')]},{'unique':!![],'name':'name_sms','fields':[_0x9253('0x8'),_0x9253('0xd')]},{'unique':!![],'name':_0x9253('0xe'),'fields':[_0x9253('0x8'),_0x9253('0xf')]},{'unique':!![],'name':_0x9253('0x10'),'fields':[_0x9253('0x8'),_0x9253('0x11')]},{'unique':!![],'name':'name_whatsapp','fields':[_0x9253('0x8'),_0x9253('0x12')]}],'timestamps':!![]});};