Built motion from commit (unavailable).|2.5.31
[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 _0xae94=['define','FaxInteraction','fax_interactions','closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','lodash','util','../../config/logger','api','path','rimraf','./faxInteraction.attributes','exports'];(function(_0x2d07bf,_0x4dc777){var _0x4f7dfa=function(_0x51b9b4){while(--_0x51b9b4){_0x2d07bf['push'](_0x2d07bf['shift']());}};_0x4f7dfa(++_0x4dc777);}(_0xae94,0x18d));var _0x4ae9=function(_0x1a1dff,_0x26b6d9){_0x1a1dff=_0x1a1dff-0x0;var _0x338253=_0xae94[_0x1a1dff];return _0x338253;};'use strict';var _=require(_0x4ae9('0x0'));var util=require(_0x4ae9('0x1'));var logger=require(_0x4ae9('0x2'))(_0x4ae9('0x3'));var moment=require('moment');var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x4ae9('0x4'));var rimraf=require(_0x4ae9('0x5'));var config=require('../../config/environment');var attributes=require(_0x4ae9('0x6'));module[_0x4ae9('0x7')]=function(_0x3ebb2d,_0x57d0a8){return _0x3ebb2d[_0x4ae9('0x8')](_0x4ae9('0x9'),attributes,{'tableName':_0x4ae9('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x496c74,_0x169178,_0x4c31a1){if(_0x496c74['changed'](_0x4ae9('0xb'))){_0x496c74[_0x4ae9('0xc')]=moment()[_0x4ae9('0xd')](_0x4ae9('0xe'));}_0x4c31a1(null,_0x496c74);}}});};