Built motion from commit (unavailable).|2.5.7
[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 _0x2d17=['changed','closed','closedAt','YYYY-MM-DD\x20HH:mm:ss','lodash','util','api','moment','request-promise','path','../../config/environment','exports','define','openchannel_interactions'];(function(_0x237446,_0x5f3e1b){var _0x276a3d=function(_0x539852){while(--_0x539852){_0x237446['push'](_0x237446['shift']());}};_0x276a3d(++_0x5f3e1b);}(_0x2d17,0x17e));var _0x72d1=function(_0x486722,_0x30fdbf){_0x486722=_0x486722-0x0;var _0x39968c=_0x2d17[_0x486722];return _0x39968c;};'use strict';var _=require(_0x72d1('0x0'));var util=require(_0x72d1('0x1'));var logger=require('../../config/logger')(_0x72d1('0x2'));var moment=require(_0x72d1('0x3'));var BPromise=require('bluebird');var rp=require(_0x72d1('0x4'));var fs=require('fs');var path=require(_0x72d1('0x5'));var rimraf=require('rimraf');var config=require(_0x72d1('0x6'));var attributes=require('./openchannelInteraction.attributes');module[_0x72d1('0x7')]=function(_0x50f551,_0x139ba0){return _0x50f551[_0x72d1('0x8')]('OpenchannelInteraction',attributes,{'tableName':_0x72d1('0x9'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x422f5a,_0x19e248,_0x4e7f3e){if(_0x422f5a[_0x72d1('0xa')](_0x72d1('0xb'))){_0x422f5a[_0x72d1('0xc')]=moment()['format'](_0x72d1('0xd'));}_0x4e7f3e(null,_0x422f5a);}}});};