395e0b1bc1ca37893124c9fa321005187e32ce66
[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 _0x2982=['name_openchannel','OpenchannelAccountId','name_whatsapp','WhatsappAccountId','lodash','util','../../config/logger','bluebird','path','rimraf','../../config/environment','exports','define','Disposition','name_voice','name','ListId','ChatWebsiteId','name_mail','MailAccountId','SmsAccountId','name_fax','FaxAccountId'];(function(_0x819464,_0x46fc91){var _0x49dcc0=function(_0x36b2b2){while(--_0x36b2b2){_0x819464['push'](_0x819464['shift']());}};_0x49dcc0(++_0x46fc91);}(_0x2982,0x174));var _0x2298=function(_0x459674,_0x23c815){_0x459674=_0x459674-0x0;var _0x4c77b0=_0x2982[_0x459674];return _0x4c77b0;};'use strict';var _=require(_0x2298('0x0'));var util=require(_0x2298('0x1'));var logger=require(_0x2298('0x2'))('api');var moment=require('moment');var BPromise=require(_0x2298('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x2298('0x4'));var rimraf=require(_0x2298('0x5'));var config=require(_0x2298('0x6'));var attributes=require('./disposition.attributes');module[_0x2298('0x7')]=function(_0x38299a,_0x2d0e36){return _0x38299a[_0x2298('0x8')](_0x2298('0x9'),attributes,{'tableName':'tools_dispositions','paranoid':![],'indexes':[{'unique':!![],'name':_0x2298('0xa'),'fields':[_0x2298('0xb'),_0x2298('0xc')]},{'unique':!![],'name':'name_chat','fields':[_0x2298('0xb'),_0x2298('0xd')]},{'unique':!![],'name':_0x2298('0xe'),'fields':['name',_0x2298('0xf')]},{'unique':!![],'name':'name_sms','fields':['name',_0x2298('0x10')]},{'unique':!![],'name':_0x2298('0x11'),'fields':['name',_0x2298('0x12')]},{'unique':!![],'name':_0x2298('0x13'),'fields':[_0x2298('0xb'),_0x2298('0x14')]},{'unique':!![],'name':_0x2298('0x15'),'fields':['name',_0x2298('0x16')]}],'timestamps':!![]});};