Built motion from commit 4e7c323b.|2.5.34
[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 _0xa342=['../../config/logger','api','moment','request-promise','./faxInteraction.attributes','exports','define','FaxInteraction','fax_interactions','changed','closed','closedAt','YYYY-MM-DD\x20HH:mm:ss','util'];(function(_0x226238,_0x54e304){var _0x137040=function(_0x52ba36){while(--_0x52ba36){_0x226238['push'](_0x226238['shift']());}};_0x137040(++_0x54e304);}(_0xa342,0x99));var _0x2a34=function(_0x68b47c,_0x4bd82e){_0x68b47c=_0x68b47c-0x0;var _0xc2c33a=_0xa342[_0x68b47c];return _0xc2c33a;};'use strict';var _=require('lodash');var util=require(_0x2a34('0x0'));var logger=require(_0x2a34('0x1'))(_0x2a34('0x2'));var moment=require(_0x2a34('0x3'));var BPromise=require('bluebird');var rp=require(_0x2a34('0x4'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x2a34('0x5'));module[_0x2a34('0x6')]=function(_0x4bad91,_0x435c75){return _0x4bad91[_0x2a34('0x7')](_0x2a34('0x8'),attributes,{'tableName':_0x2a34('0x9'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x1d5ec7,_0x54ecba,_0x3d8f11){if(_0x1d5ec7[_0x2a34('0xa')](_0x2a34('0xb'))){_0x1d5ec7[_0x2a34('0xc')]=moment()['format'](_0x2a34('0xd'));}_0x3d8f11(null,_0x1d5ec7);}}});};