Built motion from commit (unavailable).|2.5.0
[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 _0x22e8=['request-promise','path','rimraf','../../config/environment','./faxInteraction.attributes','define','FaxInteraction','fax_interactions','changed','closed','closedAt','YYYY-MM-DD\x20HH:mm:ss','lodash','../../config/logger','api','moment','bluebird'];(function(_0x31fe38,_0x5b42a4){var _0xd5639b=function(_0x3e3742){while(--_0x3e3742){_0x31fe38['push'](_0x31fe38['shift']());}};_0xd5639b(++_0x5b42a4);}(_0x22e8,0x11c));var _0x822e=function(_0x2d42e3,_0xf7136d){_0x2d42e3=_0x2d42e3-0x0;var _0x44c382=_0x22e8[_0x2d42e3];return _0x44c382;};'use strict';var _=require(_0x822e('0x0'));var util=require('util');var logger=require(_0x822e('0x1'))(_0x822e('0x2'));var moment=require(_0x822e('0x3'));var BPromise=require(_0x822e('0x4'));var rp=require(_0x822e('0x5'));var fs=require('fs');var path=require(_0x822e('0x6'));var rimraf=require(_0x822e('0x7'));var config=require(_0x822e('0x8'));var attributes=require(_0x822e('0x9'));module['exports']=function(_0xe973,_0x4d5d85){return _0xe973[_0x822e('0xa')](_0x822e('0xb'),attributes,{'tableName':_0x822e('0xc'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x2db238,_0x587417,_0x3665c8){if(_0x2db238[_0x822e('0xd')](_0x822e('0xe'))){_0x2db238[_0x822e('0xf')]=moment()['format'](_0x822e('0x10'));}_0x3665c8(null,_0x2db238);}}});};