Built motion from commit ff78e754.|2.6.29
[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 _0xd8a7=['bluebird','request-promise','rimraf','./openchannelInteraction.attributes','define','OpenchannelInteraction','openchannel_interactions','utf8mb4_unicode_ci','changed','closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','lodash','moment'];(function(_0x4ce041,_0x1636a6){var _0x25e5f7=function(_0x1b82a7){while(--_0x1b82a7){_0x4ce041['push'](_0x4ce041['shift']());}};_0x25e5f7(++_0x1636a6);}(_0xd8a7,0xdf));var _0x7d8a=function(_0x1e1f2b,_0x5efff6){_0x1e1f2b=_0x1e1f2b-0x0;var _0x44c196=_0xd8a7[_0x1e1f2b];return _0x44c196;};'use strict';var _=require(_0x7d8a('0x0'));var util=require('util');var logger=require('../../config/logger')('api');var moment=require(_0x7d8a('0x1'));var BPromise=require(_0x7d8a('0x2'));var rp=require(_0x7d8a('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0x7d8a('0x4'));var config=require('../../config/environment');var attributes=require(_0x7d8a('0x5'));module['exports']=function(_0x27ef8e,_0x530308){return _0x27ef8e[_0x7d8a('0x6')](_0x7d8a('0x7'),attributes,{'tableName':_0x7d8a('0x8'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':_0x7d8a('0x9'),'hooks':{'beforeUpdate':function(_0x135c9f,_0x1fa234,_0x328503){if(_0x135c9f[_0x7d8a('0xa')](_0x7d8a('0xb'))){_0x135c9f[_0x7d8a('0xc')]=moment()[_0x7d8a('0xd')](_0x7d8a('0xe'));}_0x328503(null,_0x135c9f);}}});};