Built motion from commit da24aabd.|2.6.20
[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 _0xacf6=['changed','closed','closedAt','YYYY-MM-DD\x20HH:mm:ss','lodash','util','../../config/logger','api','moment','bluebird','request-promise','rimraf','exports','define','FaxInteraction'];(function(_0x3511d3,_0x4107ae){var _0x5d6321=function(_0x1a23da){while(--_0x1a23da){_0x3511d3['push'](_0x3511d3['shift']());}};_0x5d6321(++_0x4107ae);}(_0xacf6,0x6d));var _0x6acf=function(_0x448a2d,_0x11e298){_0x448a2d=_0x448a2d-0x0;var _0x481b6a=_0xacf6[_0x448a2d];return _0x481b6a;};'use strict';var _=require(_0x6acf('0x0'));var util=require(_0x6acf('0x1'));var logger=require(_0x6acf('0x2'))(_0x6acf('0x3'));var moment=require(_0x6acf('0x4'));var BPromise=require(_0x6acf('0x5'));var rp=require(_0x6acf('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0x6acf('0x7'));var config=require('../../config/environment');var attributes=require('./faxInteraction.attributes');module[_0x6acf('0x8')]=function(_0x3f24be,_0x444376){return _0x3f24be[_0x6acf('0x9')](_0x6acf('0xa'),attributes,{'tableName':'fax_interactions','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x4b1422,_0x415074,_0x3fc6ba){if(_0x4b1422[_0x6acf('0xb')](_0x6acf('0xc'))){_0x4b1422[_0x6acf('0xd')]=moment()['format'](_0x6acf('0xe'));}_0x3fc6ba(null,_0x4b1422);}}});};