b8928a1e7281e5ef86bae7bfb6fc5b0bc8c9c494
[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 _0x4df9=['ListId','name_chat','name_mail','MailAccountId','SmsAccountId','name_fax','FaxAccountId','name_openchannel','OpenchannelAccountId','name_whatsapp','WhatsappAccountId','util','moment','request-promise','path','rimraf','../../config/environment','./disposition.attributes','exports','tools_dispositions','name'];(function(_0x2eab2d,_0x23b7d6){var _0x1d503e=function(_0x4c6ed4){while(--_0x4c6ed4){_0x2eab2d['push'](_0x2eab2d['shift']());}};_0x1d503e(++_0x23b7d6);}(_0x4df9,0x19a));var _0x94df=function(_0x23f496,_0x9d8d75){_0x23f496=_0x23f496-0x0;var _0x5e063f=_0x4df9[_0x23f496];return _0x5e063f;};'use strict';var _=require('lodash');var util=require(_0x94df('0x0'));var logger=require('../../config/logger')('api');var moment=require(_0x94df('0x1'));var BPromise=require('bluebird');var rp=require(_0x94df('0x2'));var fs=require('fs');var path=require(_0x94df('0x3'));var rimraf=require(_0x94df('0x4'));var config=require(_0x94df('0x5'));var attributes=require(_0x94df('0x6'));module[_0x94df('0x7')]=function(_0x3a7718,_0x5bd414){return _0x3a7718['define']('Disposition',attributes,{'tableName':_0x94df('0x8'),'paranoid':![],'indexes':[{'unique':!![],'name':'name_voice','fields':[_0x94df('0x9'),_0x94df('0xa')]},{'unique':!![],'name':_0x94df('0xb'),'fields':['name','ChatWebsiteId']},{'unique':!![],'name':_0x94df('0xc'),'fields':[_0x94df('0x9'),_0x94df('0xd')]},{'unique':!![],'name':'name_sms','fields':['name',_0x94df('0xe')]},{'unique':!![],'name':_0x94df('0xf'),'fields':[_0x94df('0x9'),_0x94df('0x10')]},{'unique':!![],'name':_0x94df('0x11'),'fields':['name',_0x94df('0x12')]},{'unique':!![],'name':_0x94df('0x13'),'fields':[_0x94df('0x9'),_0x94df('0x14')]}],'timestamps':!![]});};