f62a6b3251c5248a3082905c7ad70716be4d134c
[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 _0x8f9d=['ChatWebsiteId','name_mail','name_sms','SmsAccountId','name_fax','FaxAccountId','name_openchannel','OpenchannelAccountId','lodash','util','api','moment','request-promise','path','rimraf','../../config/environment','exports','Disposition','name','ListId','name_chat'];(function(_0x2b0f81,_0x3917f0){var _0x5ce74c=function(_0x12dc0d){while(--_0x12dc0d){_0x2b0f81['push'](_0x2b0f81['shift']());}};_0x5ce74c(++_0x3917f0);}(_0x8f9d,0x1d6));var _0xd8f9=function(_0x4a9fb1,_0x273043){_0x4a9fb1=_0x4a9fb1-0x0;var _0x348672=_0x8f9d[_0x4a9fb1];return _0x348672;};'use strict';var _=require(_0xd8f9('0x0'));var util=require(_0xd8f9('0x1'));var logger=require('../../config/logger')(_0xd8f9('0x2'));var moment=require(_0xd8f9('0x3'));var BPromise=require('bluebird');var rp=require(_0xd8f9('0x4'));var fs=require('fs');var path=require(_0xd8f9('0x5'));var rimraf=require(_0xd8f9('0x6'));var config=require(_0xd8f9('0x7'));var attributes=require('./disposition.attributes');module[_0xd8f9('0x8')]=function(_0x38c817,_0x4aa25a){return _0x38c817['define'](_0xd8f9('0x9'),attributes,{'tableName':'tools_dispositions','paranoid':![],'indexes':[{'unique':!![],'name':'name_voice','fields':[_0xd8f9('0xa'),_0xd8f9('0xb')]},{'unique':!![],'name':_0xd8f9('0xc'),'fields':[_0xd8f9('0xa'),_0xd8f9('0xd')]},{'unique':!![],'name':_0xd8f9('0xe'),'fields':[_0xd8f9('0xa'),'MailAccountId']},{'unique':!![],'name':_0xd8f9('0xf'),'fields':[_0xd8f9('0xa'),_0xd8f9('0x10')]},{'unique':!![],'name':_0xd8f9('0x11'),'fields':['name',_0xd8f9('0x12')]},{'unique':!![],'name':_0xd8f9('0x13'),'fields':['name',_0xd8f9('0x14')]}],'timestamps':!![]});};