Built motion from commit (unavailable).|2.5.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 _0x0e54=['FaxInteraction','changed','closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','lodash','util','moment','request-promise','path','./faxInteraction.attributes'];(function(_0x220e92,_0x44ae9c){var _0x59d5a7=function(_0x11dbf0){while(--_0x11dbf0){_0x220e92['push'](_0x220e92['shift']());}};_0x59d5a7(++_0x44ae9c);}(_0x0e54,0x19e));var _0x40e5=function(_0x1f016d,_0xf69315){_0x1f016d=_0x1f016d-0x0;var _0x9bf5d8=_0x0e54[_0x1f016d];return _0x9bf5d8;};'use strict';var _=require(_0x40e5('0x0'));var util=require(_0x40e5('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0x40e5('0x2'));var BPromise=require('bluebird');var rp=require(_0x40e5('0x3'));var fs=require('fs');var path=require(_0x40e5('0x4'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x40e5('0x5'));module['exports']=function(_0x181c64,_0x52df57){return _0x181c64['define'](_0x40e5('0x6'),attributes,{'tableName':'fax_interactions','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x3db9d6,_0x298a2d,_0x19580e){if(_0x3db9d6[_0x40e5('0x7')](_0x40e5('0x8'))){_0x3db9d6[_0x40e5('0x9')]=moment()[_0x40e5('0xa')](_0x40e5('0xb'));}_0x19580e(null,_0x3db9d6);}}});};