Built motion from commit (unavailable).|2.5.2
[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 _0x425d=['closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','lodash','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','./openchannelInteraction.attributes','exports','define','OpenchannelInteraction','changed'];(function(_0x1136dd,_0xea22c2){var _0x3b7c1e=function(_0x18165a){while(--_0x18165a){_0x1136dd['push'](_0x1136dd['shift']());}};_0x3b7c1e(++_0xea22c2);}(_0x425d,0x1e0));var _0xd425=function(_0x446737,_0x411246){_0x446737=_0x446737-0x0;var _0x575b95=_0x425d[_0x446737];return _0x575b95;};'use strict';var _=require(_0xd425('0x0'));var util=require('util');var logger=require(_0xd425('0x1'))(_0xd425('0x2'));var moment=require(_0xd425('0x3'));var BPromise=require(_0xd425('0x4'));var rp=require(_0xd425('0x5'));var fs=require('fs');var path=require(_0xd425('0x6'));var rimraf=require(_0xd425('0x7'));var config=require('../../config/environment');var attributes=require(_0xd425('0x8'));module[_0xd425('0x9')]=function(_0xc4e080,_0x36866e){return _0xc4e080[_0xd425('0xa')](_0xd425('0xb'),attributes,{'tableName':'openchannel_interactions','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0xb6ba8e,_0x374c3d,_0x262b02){if(_0xb6ba8e[_0xd425('0xc')](_0xd425('0xd'))){_0xb6ba8e[_0xd425('0xe')]=moment()[_0xd425('0xf')](_0xd425('0x10'));}_0x262b02(null,_0xb6ba8e);}}});};