a109d6fb4f51b61372596a173a31411b93c2acd8
[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 _0xe447=['api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./faxInteraction.attributes','define','FaxInteraction','fax_interactions','changed','closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','lodash','util','../../config/logger'];(function(_0x68c979,_0x431cff){var _0x4f0001=function(_0xa7595d){while(--_0xa7595d){_0x68c979['push'](_0x68c979['shift']());}};_0x4f0001(++_0x431cff);}(_0xe447,0x6f));var _0x7e44=function(_0xb60ae4,_0x48b458){_0xb60ae4=_0xb60ae4-0x0;var _0x53d530=_0xe447[_0xb60ae4];return _0x53d530;};'use strict';var _=require(_0x7e44('0x0'));var util=require(_0x7e44('0x1'));var logger=require(_0x7e44('0x2'))(_0x7e44('0x3'));var moment=require(_0x7e44('0x4'));var BPromise=require(_0x7e44('0x5'));var rp=require(_0x7e44('0x6'));var fs=require('fs');var path=require(_0x7e44('0x7'));var rimraf=require(_0x7e44('0x8'));var config=require(_0x7e44('0x9'));var attributes=require(_0x7e44('0xa'));module['exports']=function(_0x19311d,_0x240221){return _0x19311d[_0x7e44('0xb')](_0x7e44('0xc'),attributes,{'tableName':_0x7e44('0xd'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x3ac1b1,_0x849ebe,_0x503fda){if(_0x3ac1b1[_0x7e44('0xe')](_0x7e44('0xf'))){_0x3ac1b1[_0x7e44('0x10')]=moment()[_0x7e44('0x11')](_0x7e44('0x12'));}_0x503fda(null,_0x3ac1b1);}}});};