Built motion from commit 26159a51.|2.5.44
[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 _0x1bf3=['rimraf','../../config/environment','./faxInteraction.attributes','define','FaxInteraction','fax_interactions','changed','closed','closedAt','YYYY-MM-DD\x20HH:mm:ss','lodash','util','api','moment','bluebird','request-promise','path'];(function(_0x42bdad,_0x12836c){var _0x122626=function(_0x2eb29c){while(--_0x2eb29c){_0x42bdad['push'](_0x42bdad['shift']());}};_0x122626(++_0x12836c);}(_0x1bf3,0x16f));var _0x31bf=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x1bf3[_0x20a584];return _0x4b41a8;};'use strict';var _=require(_0x31bf('0x0'));var util=require(_0x31bf('0x1'));var logger=require('../../config/logger')(_0x31bf('0x2'));var moment=require(_0x31bf('0x3'));var BPromise=require(_0x31bf('0x4'));var rp=require(_0x31bf('0x5'));var fs=require('fs');var path=require(_0x31bf('0x6'));var rimraf=require(_0x31bf('0x7'));var config=require(_0x31bf('0x8'));var attributes=require(_0x31bf('0x9'));module['exports']=function(_0x557d5c,_0x24b931){return _0x557d5c[_0x31bf('0xa')](_0x31bf('0xb'),attributes,{'tableName':_0x31bf('0xc'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x1998b5,_0x3f9dfc,_0x331095){if(_0x1998b5[_0x31bf('0xd')](_0x31bf('0xe'))){_0x1998b5[_0x31bf('0xf')]=moment()['format'](_0x31bf('0x10'));}_0x331095(null,_0x1998b5);}}});};