a00b414f9fc92ae0686e746d9172f7e11ef4ae55
[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 _0x4aa3=['../../config/environment','./disposition.attributes','exports','define','tools_dispositions','name_voice','ListId','ChatWebsiteId','name_mail','name','MailAccountId','name_sms','name_fax','name_openchannel','OpenchannelAccountId','lodash','util','api','moment','request-promise','path'];(function(_0x56da70,_0x9eb691){var _0x5c8d5e=function(_0x1529f8){while(--_0x1529f8){_0x56da70['push'](_0x56da70['shift']());}};_0x5c8d5e(++_0x9eb691);}(_0x4aa3,0x174));var _0x34aa=function(_0x1a8945,_0x561526){_0x1a8945=_0x1a8945-0x0;var _0x270901=_0x4aa3[_0x1a8945];return _0x270901;};'use strict';var _=require(_0x34aa('0x0'));var util=require(_0x34aa('0x1'));var logger=require('../../config/logger')(_0x34aa('0x2'));var moment=require(_0x34aa('0x3'));var BPromise=require('bluebird');var rp=require(_0x34aa('0x4'));var fs=require('fs');var path=require(_0x34aa('0x5'));var rimraf=require('rimraf');var config=require(_0x34aa('0x6'));var attributes=require(_0x34aa('0x7'));module[_0x34aa('0x8')]=function(_0x5a717c,_0x201f69){return _0x5a717c[_0x34aa('0x9')]('Disposition',attributes,{'tableName':_0x34aa('0xa'),'paranoid':![],'indexes':[{'unique':!![],'name':_0x34aa('0xb'),'fields':['name',_0x34aa('0xc')]},{'unique':!![],'name':'name_chat','fields':['name',_0x34aa('0xd')]},{'unique':!![],'name':_0x34aa('0xe'),'fields':[_0x34aa('0xf'),_0x34aa('0x10')]},{'unique':!![],'name':_0x34aa('0x11'),'fields':[_0x34aa('0xf'),'SmsAccountId']},{'unique':!![],'name':_0x34aa('0x12'),'fields':['name','FaxAccountId']},{'unique':!![],'name':_0x34aa('0x13'),'fields':[_0x34aa('0xf'),_0x34aa('0x14')]},{'unique':!![],'name':'name_whatsapp','fields':[_0x34aa('0xf'),'WhatsappAccountId']}],'timestamps':!![]});};