Built motion from commit (unavailable).|2.5.0
[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 _0xa4fe=['format','YYYY-MM-DD\x20HH:mm:ss','lodash','api','moment','request-promise','rimraf','../../config/environment','./faxInteraction.attributes','exports','define','FaxInteraction','changed','closed'];(function(_0x4a9fb1,_0x273043){var _0x348672=function(_0x142b69){while(--_0x142b69){_0x4a9fb1['push'](_0x4a9fb1['shift']());}};_0x348672(++_0x273043);}(_0xa4fe,0x1de));var _0xea4f=function(_0x4f7100,_0x3ab1ea){_0x4f7100=_0x4f7100-0x0;var _0x397bbb=_0xa4fe[_0x4f7100];return _0x397bbb;};'use strict';var _=require(_0xea4f('0x0'));var util=require('util');var logger=require('../../config/logger')(_0xea4f('0x1'));var moment=require(_0xea4f('0x2'));var BPromise=require('bluebird');var rp=require(_0xea4f('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0xea4f('0x4'));var config=require(_0xea4f('0x5'));var attributes=require(_0xea4f('0x6'));module[_0xea4f('0x7')]=function(_0x433591,_0x54453b){return _0x433591[_0xea4f('0x8')](_0xea4f('0x9'),attributes,{'tableName':'fax_interactions','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x18998d,_0x49b8d9,_0x3f3024){if(_0x18998d[_0xea4f('0xa')](_0xea4f('0xb'))){_0x18998d['closedAt']=moment()[_0xea4f('0xc')](_0xea4f('0xd'));}_0x3f3024(null,_0x18998d);}}});};