Built motion from commit cb845558.|2.6.34
[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 _0xe557=['rimraf','../../config/environment','./openchannelInteraction.attributes','define','OpenchannelInteraction','openchannel_interactions','closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','lodash','util','../../config/logger','moment','path'];(function(_0x9f970c,_0x39b548){var _0x1d1e3c=function(_0x86fda2){while(--_0x86fda2){_0x9f970c['push'](_0x9f970c['shift']());}};_0x1d1e3c(++_0x39b548);}(_0xe557,0x154));var _0x7e55=function(_0x2d7f0e,_0x3e6fbd){_0x2d7f0e=_0x2d7f0e-0x0;var _0x110b07=_0xe557[_0x2d7f0e];return _0x110b07;};'use strict';var _=require(_0x7e55('0x0'));var util=require(_0x7e55('0x1'));var logger=require(_0x7e55('0x2'))('api');var moment=require(_0x7e55('0x3'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x7e55('0x4'));var rimraf=require(_0x7e55('0x5'));var config=require(_0x7e55('0x6'));var attributes=require(_0x7e55('0x7'));module['exports']=function(_0x3f6a10,_0x48ccac){return _0x3f6a10[_0x7e55('0x8')](_0x7e55('0x9'),attributes,{'tableName':_0x7e55('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':'utf8mb4_unicode_ci','hooks':{'beforeUpdate':function(_0x230c27,_0xea0fe4,_0x2f6b00){if(_0x230c27['changed'](_0x7e55('0xb'))){_0x230c27[_0x7e55('0xc')]=moment()[_0x7e55('0xd')](_0x7e55('0xe'));}_0x2f6b00(null,_0x230c27);}}});};