f7d0839b84d72bef671df35e2cd920e3baf45288
[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 _0x277c=['closedAt','format','YYYY-MM-DD\x20HH:mm:ss','lodash','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','define','openchannel_interactions','changed','closed'];(function(_0x4f73d0,_0x1ae041){var _0x454eef=function(_0x1c6e61){while(--_0x1c6e61){_0x4f73d0['push'](_0x4f73d0['shift']());}};_0x454eef(++_0x1ae041);}(_0x277c,0x153));var _0xc277=function(_0x1d1bce,_0x159f10){_0x1d1bce=_0x1d1bce-0x0;var _0x46370c=_0x277c[_0x1d1bce];return _0x46370c;};'use strict';var _=require(_0xc277('0x0'));var util=require('util');var logger=require(_0xc277('0x1'))(_0xc277('0x2'));var moment=require(_0xc277('0x3'));var BPromise=require(_0xc277('0x4'));var rp=require(_0xc277('0x5'));var fs=require('fs');var path=require(_0xc277('0x6'));var rimraf=require(_0xc277('0x7'));var config=require(_0xc277('0x8'));var attributes=require('./openchannelInteraction.attributes');module['exports']=function(_0x1a6582,_0x5a4f03){return _0x1a6582[_0xc277('0x9')]('OpenchannelInteraction',attributes,{'tableName':_0xc277('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x17a2fe,_0x55be1f,_0x324ef7){if(_0x17a2fe[_0xc277('0xb')](_0xc277('0xc'))){_0x17a2fe[_0xc277('0xd')]=moment()[_0xc277('0xe')](_0xc277('0xf'));}_0x324ef7(null,_0x17a2fe);}}});};