Built motion from commit 936e8062.|2.5.33
[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 _0x59f2=['path','rimraf','./faxInteraction.attributes','exports','define','FaxInteraction','fax_interactions','changed','closed','closedAt','YYYY-MM-DD\x20HH:mm:ss','api','bluebird','request-promise'];(function(_0x28e926,_0x1191c0){var _0x426eaa=function(_0x58d1e1){while(--_0x58d1e1){_0x28e926['push'](_0x28e926['shift']());}};_0x426eaa(++_0x1191c0);}(_0x59f2,0xb3));var _0x259f=function(_0x3947c9,_0x4d6c97){_0x3947c9=_0x3947c9-0x0;var _0x2e7871=_0x59f2[_0x3947c9];return _0x2e7871;};'use strict';var _=require('lodash');var util=require('util');var logger=require('../../config/logger')(_0x259f('0x0'));var moment=require('moment');var BPromise=require(_0x259f('0x1'));var rp=require(_0x259f('0x2'));var fs=require('fs');var path=require(_0x259f('0x3'));var rimraf=require(_0x259f('0x4'));var config=require('../../config/environment');var attributes=require(_0x259f('0x5'));module[_0x259f('0x6')]=function(_0x52d53e,_0x53b4c0){return _0x52d53e[_0x259f('0x7')](_0x259f('0x8'),attributes,{'tableName':_0x259f('0x9'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x48d09f,_0x36cd4f,_0x4a0dac){if(_0x48d09f[_0x259f('0xa')](_0x259f('0xb'))){_0x48d09f[_0x259f('0xc')]=moment()['format'](_0x259f('0xd'));}_0x4a0dac(null,_0x48d09f);}}});};