Built motion from commit b0a9a629.|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 _0x4bb2=['path','../../config/environment','./faxInteraction.attributes','exports','define','FaxInteraction','fax_interactions','changed','closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','lodash','../../config/logger','api','moment','request-promise'];(function(_0x4df58e,_0xf2d8dd){var _0x16ac17=function(_0x28a08c){while(--_0x28a08c){_0x4df58e['push'](_0x4df58e['shift']());}};_0x16ac17(++_0xf2d8dd);}(_0x4bb2,0x11c));var _0x24bb=function(_0x406561,_0x2036ae){_0x406561=_0x406561-0x0;var _0x942aab=_0x4bb2[_0x406561];return _0x942aab;};'use strict';var _=require(_0x24bb('0x0'));var util=require('util');var logger=require(_0x24bb('0x1'))(_0x24bb('0x2'));var moment=require(_0x24bb('0x3'));var BPromise=require('bluebird');var rp=require(_0x24bb('0x4'));var fs=require('fs');var path=require(_0x24bb('0x5'));var rimraf=require('rimraf');var config=require(_0x24bb('0x6'));var attributes=require(_0x24bb('0x7'));module[_0x24bb('0x8')]=function(_0x12d63c,_0x4c70d){return _0x12d63c[_0x24bb('0x9')](_0x24bb('0xa'),attributes,{'tableName':_0x24bb('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x1a9fcc,_0x1973cc,_0x2c2b44){if(_0x1a9fcc[_0x24bb('0xc')](_0x24bb('0xd'))){_0x1a9fcc[_0x24bb('0xe')]=moment()[_0x24bb('0xf')](_0x24bb('0x10'));}_0x2c2b44(null,_0x1a9fcc);}}});};