Built motion from commit (unavailable).|2.5.11
[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 _0xe345=['define','FaxInteraction','changed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','lodash','util','../../config/logger','api','moment','bluebird','request-promise','rimraf','../../config/environment','./faxInteraction.attributes','exports'];(function(_0x46076e,_0x298c8b){var _0x3a695a=function(_0x446ef4){while(--_0x446ef4){_0x46076e['push'](_0x46076e['shift']());}};_0x3a695a(++_0x298c8b);}(_0xe345,0x17c));var _0x5e34=function(_0xa83955,_0x842b87){_0xa83955=_0xa83955-0x0;var _0x39d283=_0xe345[_0xa83955];return _0x39d283;};'use strict';var _=require(_0x5e34('0x0'));var util=require(_0x5e34('0x1'));var logger=require(_0x5e34('0x2'))(_0x5e34('0x3'));var moment=require(_0x5e34('0x4'));var BPromise=require(_0x5e34('0x5'));var rp=require(_0x5e34('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0x5e34('0x7'));var config=require(_0x5e34('0x8'));var attributes=require(_0x5e34('0x9'));module[_0x5e34('0xa')]=function(_0x293145,_0xacf670){return _0x293145[_0x5e34('0xb')](_0x5e34('0xc'),attributes,{'tableName':'fax_interactions','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x3d7f0e,_0x5f09c3,_0x523514){if(_0x3d7f0e[_0x5e34('0xd')]('closed')){_0x3d7f0e[_0x5e34('0xe')]=moment()[_0x5e34('0xf')](_0x5e34('0x10'));}_0x523514(null,_0x3d7f0e);}}});};