Built motion from commit 5293bb2a.|2.6.30
[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 _0xe256=['util','../../config/logger','moment','bluebird','path','rimraf','../../config/environment','./faxInteraction.attributes','exports','define','FaxInteraction','fax_interactions','changed','closed','closedAt','YYYY-MM-DD\x20HH:mm:ss','lodash'];(function(_0x21a9d9,_0x4d5ac8){var _0x46adce=function(_0xfdd336){while(--_0xfdd336){_0x21a9d9['push'](_0x21a9d9['shift']());}};_0x46adce(++_0x4d5ac8);}(_0xe256,0x197));var _0x6e25=function(_0x515bb8,_0x333e51){_0x515bb8=_0x515bb8-0x0;var _0x3691b7=_0xe256[_0x515bb8];return _0x3691b7;};'use strict';var _=require(_0x6e25('0x0'));var util=require(_0x6e25('0x1'));var logger=require(_0x6e25('0x2'))('api');var moment=require(_0x6e25('0x3'));var BPromise=require(_0x6e25('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x6e25('0x5'));var rimraf=require(_0x6e25('0x6'));var config=require(_0x6e25('0x7'));var attributes=require(_0x6e25('0x8'));module[_0x6e25('0x9')]=function(_0x2e6b46,_0x213db8){return _0x2e6b46[_0x6e25('0xa')](_0x6e25('0xb'),attributes,{'tableName':_0x6e25('0xc'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x5c9cf3,_0x595fef,_0x299d28){if(_0x5c9cf3[_0x6e25('0xd')](_0x6e25('0xe'))){_0x5c9cf3[_0x6e25('0xf')]=moment()['format'](_0x6e25('0x10'));}_0x299d28(null,_0x5c9cf3);}}});};