Built motion from commit d1eab355.|2.6.28
[motion2.git] / server / api / faxInteraction / faxInteraction.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 _0x3d0f=['./faxInteraction.attributes','exports','fax_interactions','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','lodash','util','moment','bluebird','request-promise','path','rimraf','../../config/environment'];(function(_0x2f0927,_0x3f6c27){var _0x3f51d9=function(_0x167baa){while(--_0x167baa){_0x2f0927['push'](_0x2f0927['shift']());}};_0x3f51d9(++_0x3f6c27);}(_0x3d0f,0x1f0));var _0xf3d0=function(_0x2cdec6,_0x39d4c8){_0x2cdec6=_0x2cdec6-0x0;var _0xa36703=_0x3d0f[_0x2cdec6];return _0xa36703;};'use strict';var _=require(_0xf3d0('0x0'));var util=require(_0xf3d0('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0xf3d0('0x2'));var BPromise=require(_0xf3d0('0x3'));var rp=require(_0xf3d0('0x4'));var fs=require('fs');var path=require(_0xf3d0('0x5'));var rimraf=require(_0xf3d0('0x6'));var config=require(_0xf3d0('0x7'));var attributes=require(_0xf3d0('0x8'));module[_0xf3d0('0x9')]=function(_0x4e23aa,_0x554d11){return _0x4e23aa['define']('FaxInteraction',attributes,{'tableName':_0xf3d0('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x2efa1a,_0x6db2a6,_0x1ed8a9){if(_0x2efa1a['changed']('closed')){_0x2efa1a[_0xf3d0('0xb')]=moment()[_0xf3d0('0xc')](_0xf3d0('0xd'));}_0x1ed8a9(null,_0x2efa1a);}}});};