Built motion from commit 9d1906d1.|2.5.40
[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 _0x8d59=['bluebird','request-promise','path','rimraf','../../config/environment','./faxInteraction.attributes','exports','define','FaxInteraction','changed','closed','format','YYYY-MM-DD\x20HH:mm:ss','lodash','util','../../config/logger','api','moment'];(function(_0x17d0df,_0x3e3929){var _0x270193=function(_0xe4d41e){while(--_0xe4d41e){_0x17d0df['push'](_0x17d0df['shift']());}};_0x270193(++_0x3e3929);}(_0x8d59,0x109));var _0x98d5=function(_0x146f63,_0x419496){_0x146f63=_0x146f63-0x0;var _0x327619=_0x8d59[_0x146f63];return _0x327619;};'use strict';var _=require(_0x98d5('0x0'));var util=require(_0x98d5('0x1'));var logger=require(_0x98d5('0x2'))(_0x98d5('0x3'));var moment=require(_0x98d5('0x4'));var BPromise=require(_0x98d5('0x5'));var rp=require(_0x98d5('0x6'));var fs=require('fs');var path=require(_0x98d5('0x7'));var rimraf=require(_0x98d5('0x8'));var config=require(_0x98d5('0x9'));var attributes=require(_0x98d5('0xa'));module[_0x98d5('0xb')]=function(_0x18e9c2,_0x1b7b27){return _0x18e9c2[_0x98d5('0xc')](_0x98d5('0xd'),attributes,{'tableName':'fax_interactions','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x290bee,_0x57a61a,_0x13530e){if(_0x290bee[_0x98d5('0xe')](_0x98d5('0xf'))){_0x290bee['closedAt']=moment()[_0x98d5('0x10')](_0x98d5('0x11'));}_0x13530e(null,_0x290bee);}}});};