Built motion from commit (unavailable).|2.5.14
[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 _0x85d0=['OpenchannelInteraction','changed','closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','moment','bluebird','request-promise','path','rimraf','../../config/environment','exports','define'];(function(_0x3acd2d,_0x388d83){var _0x12cc72=function(_0x106d5a){while(--_0x106d5a){_0x3acd2d['push'](_0x3acd2d['shift']());}};_0x12cc72(++_0x388d83);}(_0x85d0,0x164));var _0x085d=function(_0x286be5,_0x50fea4){_0x286be5=_0x286be5-0x0;var _0xc5bb8e=_0x85d0[_0x286be5];return _0xc5bb8e;};'use strict';var _=require('lodash');var util=require('util');var logger=require('../../config/logger')('api');var moment=require(_0x085d('0x0'));var BPromise=require(_0x085d('0x1'));var rp=require(_0x085d('0x2'));var fs=require('fs');var path=require(_0x085d('0x3'));var rimraf=require(_0x085d('0x4'));var config=require(_0x085d('0x5'));var attributes=require('./openchannelInteraction.attributes');module[_0x085d('0x6')]=function(_0x5c917f,_0x364f09){return _0x5c917f[_0x085d('0x7')](_0x085d('0x8'),attributes,{'tableName':'openchannel_interactions','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0xf65d01,_0xa94124,_0x210aa0){if(_0xf65d01[_0x085d('0x9')](_0x085d('0xa'))){_0xf65d01[_0x085d('0xb')]=moment()[_0x085d('0xc')](_0x085d('0xd'));}_0x210aa0(null,_0xf65d01);}}});};