Built motion from commit d6d69adf.|2.6.33
[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 _0xb1fc=['format','YYYY-MM-DD\x20HH:mm:ss','lodash','util','moment','request-promise','rimraf','../../config/environment','./faxInteraction.attributes','define','FaxInteraction','fax_interactions','changed','closed','closedAt'];(function(_0x471b69,_0x38e3b6){var _0x3e1854=function(_0x2dab9d){while(--_0x2dab9d){_0x471b69['push'](_0x471b69['shift']());}};_0x3e1854(++_0x38e3b6);}(_0xb1fc,0xf2));var _0xcb1f=function(_0x4fbb78,_0x273eae){_0x4fbb78=_0x4fbb78-0x0;var _0x5eb3a3=_0xb1fc[_0x4fbb78];return _0x5eb3a3;};'use strict';var _=require(_0xcb1f('0x0'));var util=require(_0xcb1f('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0xcb1f('0x2'));var BPromise=require('bluebird');var rp=require(_0xcb1f('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0xcb1f('0x4'));var config=require(_0xcb1f('0x5'));var attributes=require(_0xcb1f('0x6'));module['exports']=function(_0x48f9c5,_0xede29c){return _0x48f9c5[_0xcb1f('0x7')](_0xcb1f('0x8'),attributes,{'tableName':_0xcb1f('0x9'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0xd21c9e,_0x1849e0,_0xe62505){if(_0xd21c9e[_0xcb1f('0xa')](_0xcb1f('0xb'))){_0xd21c9e[_0xcb1f('0xc')]=moment()[_0xcb1f('0xd')](_0xcb1f('0xe'));}_0xe62505(null,_0xd21c9e);}}});};