Built motion from commit (unavailable).|2.5.17
[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 _0x8ef6=['bluebird','request-promise','rimraf','../../config/environment','./openchannelInteraction.attributes','exports','define','OpenchannelInteraction','openchannel_interactions','changed','closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','lodash','util','../../config/logger','api','moment'];(function(_0x11128c,_0x31af34){var _0xe54b4b=function(_0x39c8a3){while(--_0x39c8a3){_0x11128c['push'](_0x11128c['shift']());}};_0xe54b4b(++_0x31af34);}(_0x8ef6,0xf2));var _0x68ef=function(_0x33cdf8,_0x1a4b44){_0x33cdf8=_0x33cdf8-0x0;var _0x49e8cc=_0x8ef6[_0x33cdf8];return _0x49e8cc;};'use strict';var _=require(_0x68ef('0x0'));var util=require(_0x68ef('0x1'));var logger=require(_0x68ef('0x2'))(_0x68ef('0x3'));var moment=require(_0x68ef('0x4'));var BPromise=require(_0x68ef('0x5'));var rp=require(_0x68ef('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0x68ef('0x7'));var config=require(_0x68ef('0x8'));var attributes=require(_0x68ef('0x9'));module[_0x68ef('0xa')]=function(_0x4d26e3,_0x4f77f3){return _0x4d26e3[_0x68ef('0xb')](_0x68ef('0xc'),attributes,{'tableName':_0x68ef('0xd'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x4eb5eb,_0x228967,_0x31007e){if(_0x4eb5eb[_0x68ef('0xe')](_0x68ef('0xf'))){_0x4eb5eb[_0x68ef('0x10')]=moment()[_0x68ef('0x11')](_0x68ef('0x12'));}_0x31007e(null,_0x4eb5eb);}}});};