59aa9971100984161d5029921bcaf2e0ca421156
[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 _0x2f2e=['name_chat','ChatWebsiteId','name_mail','name','MailAccountId','SmsAccountId','FaxAccountId','name_openchannel','OpenchannelAccountId','name_whatsapp','WhatsappAccountId','util','../../config/logger','moment','request-promise','path','rimraf','../../config/environment','define','Disposition','tools_dispositions'];(function(_0x165c43,_0xf7e6a){var _0x49237d=function(_0x3bfdf7){while(--_0x3bfdf7){_0x165c43['push'](_0x165c43['shift']());}};_0x49237d(++_0xf7e6a);}(_0x2f2e,0x146));var _0xe2f2=function(_0x195c21,_0x332612){_0x195c21=_0x195c21-0x0;var _0x3576a8=_0x2f2e[_0x195c21];return _0x3576a8;};'use strict';var _=require('lodash');var util=require(_0xe2f2('0x0'));var logger=require(_0xe2f2('0x1'))('api');var moment=require(_0xe2f2('0x2'));var BPromise=require('bluebird');var rp=require(_0xe2f2('0x3'));var fs=require('fs');var path=require(_0xe2f2('0x4'));var rimraf=require(_0xe2f2('0x5'));var config=require(_0xe2f2('0x6'));var attributes=require('./disposition.attributes');module['exports']=function(_0x5b202f,_0x3dca30){return _0x5b202f[_0xe2f2('0x7')](_0xe2f2('0x8'),attributes,{'tableName':_0xe2f2('0x9'),'paranoid':![],'indexes':[{'unique':!![],'name':'name_voice','fields':['name','ListId']},{'unique':!![],'name':_0xe2f2('0xa'),'fields':['name',_0xe2f2('0xb')]},{'unique':!![],'name':_0xe2f2('0xc'),'fields':[_0xe2f2('0xd'),_0xe2f2('0xe')]},{'unique':!![],'name':'name_sms','fields':[_0xe2f2('0xd'),_0xe2f2('0xf')]},{'unique':!![],'name':'name_fax','fields':[_0xe2f2('0xd'),_0xe2f2('0x10')]},{'unique':!![],'name':_0xe2f2('0x11'),'fields':[_0xe2f2('0xd'),_0xe2f2('0x12')]},{'unique':!![],'name':_0xe2f2('0x13'),'fields':[_0xe2f2('0xd'),_0xe2f2('0x14')]}],'timestamps':!![]});};