Built motion from commit (unavailable).|2.5.23
[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 _0xee1d=['../../config/logger','moment','bluebird','request-promise','rimraf','./faxInteraction.attributes','exports','define','FaxInteraction','fax_interactions','format','YYYY-MM-DD\x20HH:mm:ss'];(function(_0x2aeca6,_0x565154){var _0x48c8c9=function(_0x739357){while(--_0x739357){_0x2aeca6['push'](_0x2aeca6['shift']());}};_0x48c8c9(++_0x565154);}(_0xee1d,0x90));var _0xdee1=function(_0x2f8c37,_0x582b36){_0x2f8c37=_0x2f8c37-0x0;var _0x224145=_0xee1d[_0x2f8c37];return _0x224145;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0xdee1('0x0'))('api');var moment=require(_0xdee1('0x1'));var BPromise=require(_0xdee1('0x2'));var rp=require(_0xdee1('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0xdee1('0x4'));var config=require('../../config/environment');var attributes=require(_0xdee1('0x5'));module[_0xdee1('0x6')]=function(_0x10a11e,_0x10917f){return _0x10a11e[_0xdee1('0x7')](_0xdee1('0x8'),attributes,{'tableName':_0xdee1('0x9'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x30ec22,_0x5f15e3,_0x2828ca){if(_0x30ec22['changed']('closed')){_0x30ec22['closedAt']=moment()[_0xdee1('0xa')](_0xdee1('0xb'));}_0x2828ca(null,_0x30ec22);}}});};