d68c0bc4bb62f50db130087d94a00a096a87cd13
[motion2.git] / server / api / openchannelInteraction / openchannelInteraction.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 _0xcdc5=['rimraf','./openchannelInteraction.attributes','exports','define','openchannel_interactions','utf8mb4','utf8mb4_unicode_ci','changed','closed','closedAt','format','lodash','../../config/logger','api','moment','bluebird','request-promise','path'];(function(_0x469b03,_0x28f639){var _0x11b65c=function(_0x5c4611){while(--_0x5c4611){_0x469b03['push'](_0x469b03['shift']());}};_0x11b65c(++_0x28f639);}(_0xcdc5,0x119));var _0x5cdc=function(_0x2ad925,_0x24f451){_0x2ad925=_0x2ad925-0x0;var _0x1d8732=_0xcdc5[_0x2ad925];return _0x1d8732;};'use strict';var _=require(_0x5cdc('0x0'));var util=require('util');var logger=require(_0x5cdc('0x1'))(_0x5cdc('0x2'));var moment=require(_0x5cdc('0x3'));var BPromise=require(_0x5cdc('0x4'));var rp=require(_0x5cdc('0x5'));var fs=require('fs');var path=require(_0x5cdc('0x6'));var rimraf=require(_0x5cdc('0x7'));var config=require('../../config/environment');var attributes=require(_0x5cdc('0x8'));module[_0x5cdc('0x9')]=function(_0x25fc04,_0x465817){return _0x25fc04[_0x5cdc('0xa')]('OpenchannelInteraction',attributes,{'tableName':_0x5cdc('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x5cdc('0xc'),'collate':_0x5cdc('0xd'),'hooks':{'beforeUpdate':function(_0x2b9547,_0x40a4d3,_0x318205){if(_0x2b9547[_0x5cdc('0xe')](_0x5cdc('0xf'))){_0x2b9547[_0x5cdc('0x10')]=moment()[_0x5cdc('0x11')]('YYYY-MM-DD\x20HH:mm:ss');}_0x318205(null,_0x2b9547);}}});};