Built motion from commit (unavailable).|2.4.18
[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 _0xf69d=['request-promise','path','rimraf','../../config/environment','./openchannelInteraction.attributes','exports','define','OpenchannelInteraction','openchannel_interactions','changed','closed','closedAt','YYYY-MM-DD\x20HH:mm:ss','lodash','util','../../config/logger','api','moment'];(function(_0x340a11,_0x72d301){var _0x4ad9fb=function(_0x3b47f6){while(--_0x3b47f6){_0x340a11['push'](_0x340a11['shift']());}};_0x4ad9fb(++_0x72d301);}(_0xf69d,0xd3));var _0xdf69=function(_0x19f0e9,_0x551022){_0x19f0e9=_0x19f0e9-0x0;var _0x3cb193=_0xf69d[_0x19f0e9];return _0x3cb193;};'use strict';var _=require(_0xdf69('0x0'));var util=require(_0xdf69('0x1'));var logger=require(_0xdf69('0x2'))(_0xdf69('0x3'));var moment=require(_0xdf69('0x4'));var BPromise=require('bluebird');var rp=require(_0xdf69('0x5'));var fs=require('fs');var path=require(_0xdf69('0x6'));var rimraf=require(_0xdf69('0x7'));var config=require(_0xdf69('0x8'));var attributes=require(_0xdf69('0x9'));module[_0xdf69('0xa')]=function(_0x2d456f,_0x465b1b){return _0x2d456f[_0xdf69('0xb')](_0xdf69('0xc'),attributes,{'tableName':_0xdf69('0xd'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0xc1b77e,_0x38909e,_0x466c26){if(_0xc1b77e[_0xdf69('0xe')](_0xdf69('0xf'))){_0xc1b77e[_0xdf69('0x10')]=moment()['format'](_0xdf69('0x11'));}_0x466c26(null,_0xc1b77e);}}});};