Built motion from commit d5e4af8c.|2.6.23
[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 _0x03fa=['closed','closedAt','format','lodash','api','moment','bluebird','request-promise','rimraf','define','FaxInteraction','changed'];(function(_0x442030,_0x5f363e){var _0x569fed=function(_0x50f88d){while(--_0x50f88d){_0x442030['push'](_0x442030['shift']());}};_0x569fed(++_0x5f363e);}(_0x03fa,0x117));var _0xa03f=function(_0x8c0251,_0x5b79bc){_0x8c0251=_0x8c0251-0x0;var _0x83108b=_0x03fa[_0x8c0251];return _0x83108b;};'use strict';var _=require(_0xa03f('0x0'));var util=require('util');var logger=require('../../config/logger')(_0xa03f('0x1'));var moment=require(_0xa03f('0x2'));var BPromise=require(_0xa03f('0x3'));var rp=require(_0xa03f('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0xa03f('0x5'));var config=require('../../config/environment');var attributes=require('./faxInteraction.attributes');module['exports']=function(_0x40108a,_0x1bb9e6){return _0x40108a[_0xa03f('0x6')](_0xa03f('0x7'),attributes,{'tableName':'fax_interactions','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x1a1050,_0x104f42,_0x42f4ca){if(_0x1a1050[_0xa03f('0x8')](_0xa03f('0x9'))){_0x1a1050[_0xa03f('0xa')]=moment()[_0xa03f('0xb')]('YYYY-MM-DD\x20HH:mm:ss');}_0x42f4ca(null,_0x1a1050);}}});};