b46db8d8f19c9f5901c5c1f1793fd760e8f52d12
[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 _0xb2e3=['define','FaxInteraction','fax_interactions','changed','closed','closedAt','moment','bluebird','request-promise','path','rimraf','../../config/environment','./faxInteraction.attributes','exports'];(function(_0x16b3d2,_0xbf875e){var _0xb51e37=function(_0x396b62){while(--_0x396b62){_0x16b3d2['push'](_0x16b3d2['shift']());}};_0xb51e37(++_0xbf875e);}(_0xb2e3,0xd8));var _0x3b2e=function(_0x3b0731,_0xcf9925){_0x3b0731=_0x3b0731-0x0;var _0x4204d7=_0xb2e3[_0x3b0731];return _0x4204d7;};'use strict';var _=require('lodash');var util=require('util');var logger=require('../../config/logger')('api');var moment=require(_0x3b2e('0x0'));var BPromise=require(_0x3b2e('0x1'));var rp=require(_0x3b2e('0x2'));var fs=require('fs');var path=require(_0x3b2e('0x3'));var rimraf=require(_0x3b2e('0x4'));var config=require(_0x3b2e('0x5'));var attributes=require(_0x3b2e('0x6'));module[_0x3b2e('0x7')]=function(_0x37a348,_0x5f198f){return _0x37a348[_0x3b2e('0x8')](_0x3b2e('0x9'),attributes,{'tableName':_0x3b2e('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0xe6744e,_0x5a5410,_0x45c5b9){if(_0xe6744e[_0x3b2e('0xb')](_0x3b2e('0xc'))){_0xe6744e[_0x3b2e('0xd')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');}_0x45c5b9(null,_0xe6744e);}}});};