Built motion from commit 56b8093a.|2.6.29
[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 _0xdb4d=['FaxInteraction','fax_interactions','changed','closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','lodash','../../config/logger','moment','bluebird','request-promise','path','rimraf'];(function(_0x39556c,_0x2270d9){var _0x41bcbe=function(_0x577a48){while(--_0x577a48){_0x39556c['push'](_0x39556c['shift']());}};_0x41bcbe(++_0x2270d9);}(_0xdb4d,0x77));var _0xddb4=function(_0x34b838,_0x5d3965){_0x34b838=_0x34b838-0x0;var _0x503e93=_0xdb4d[_0x34b838];return _0x503e93;};'use strict';var _=require(_0xddb4('0x0'));var util=require('util');var logger=require(_0xddb4('0x1'))('api');var moment=require(_0xddb4('0x2'));var BPromise=require(_0xddb4('0x3'));var rp=require(_0xddb4('0x4'));var fs=require('fs');var path=require(_0xddb4('0x5'));var rimraf=require(_0xddb4('0x6'));var config=require('../../config/environment');var attributes=require('./faxInteraction.attributes');module['exports']=function(_0x7bbf36,_0x5c2002){return _0x7bbf36['define'](_0xddb4('0x7'),attributes,{'tableName':_0xddb4('0x8'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x47bf57,_0xf60e5a,_0x38ef40){if(_0x47bf57[_0xddb4('0x9')](_0xddb4('0xa'))){_0x47bf57[_0xddb4('0xb')]=moment()[_0xddb4('0xc')](_0xddb4('0xd'));}_0x38ef40(null,_0x47bf57);}}});};