Built motion from commit ffdca78c.|2.6.24
[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 _0x983f=['fax_interactions','closedAt','format','../../config/logger','moment','../../config/environment','./faxInteraction.attributes','define'];(function(_0x4492af,_0x47e25d){var _0x216729=function(_0x4964c8){while(--_0x4964c8){_0x4492af['push'](_0x4492af['shift']());}};_0x216729(++_0x47e25d);}(_0x983f,0xe3));var _0xf983=function(_0x5ea800,_0x725476){_0x5ea800=_0x5ea800-0x0;var _0x16bdbd=_0x983f[_0x5ea800];return _0x16bdbd;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0xf983('0x0'))('api');var moment=require(_0xf983('0x1'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0xf983('0x2'));var attributes=require(_0xf983('0x3'));module['exports']=function(_0x4ada3d,_0x4758d3){return _0x4ada3d[_0xf983('0x4')]('FaxInteraction',attributes,{'tableName':_0xf983('0x5'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x3bc09b,_0x3b6816,_0x519846){if(_0x3bc09b['changed']('closed')){_0x3bc09b[_0xf983('0x6')]=moment()[_0xf983('0x7')]('YYYY-MM-DD\x20HH:mm:ss');}_0x519846(null,_0x3bc09b);}}});};