7e642efef834ae58065f01ec398fd17d4f9c6ebf
[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 _0xd9c4=['lodash','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./faxInteraction.attributes','exports','define','fax_interactions','changed','closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss'];(function(_0x36fe1e,_0x175199){var _0x3368ef=function(_0x74679f){while(--_0x74679f){_0x36fe1e['push'](_0x36fe1e['shift']());}};_0x3368ef(++_0x175199);}(_0xd9c4,0xee));var _0x4d9c=function(_0x339129,_0x86dcc6){_0x339129=_0x339129-0x0;var _0x1570df=_0xd9c4[_0x339129];return _0x1570df;};'use strict';var _=require(_0x4d9c('0x0'));var util=require('util');var logger=require('../../config/logger')(_0x4d9c('0x1'));var moment=require(_0x4d9c('0x2'));var BPromise=require(_0x4d9c('0x3'));var rp=require(_0x4d9c('0x4'));var fs=require('fs');var path=require(_0x4d9c('0x5'));var rimraf=require(_0x4d9c('0x6'));var config=require(_0x4d9c('0x7'));var attributes=require(_0x4d9c('0x8'));module[_0x4d9c('0x9')]=function(_0x1fa517,_0x1ee9e9){return _0x1fa517[_0x4d9c('0xa')]('FaxInteraction',attributes,{'tableName':_0x4d9c('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0xe9ce3c,_0x386bbb,_0x4b863b){if(_0xe9ce3c[_0x4d9c('0xc')](_0x4d9c('0xd'))){_0xe9ce3c[_0x4d9c('0xe')]=moment()[_0x4d9c('0xf')](_0x4d9c('0x10'));}_0x4b863b(null,_0xe9ce3c);}}});};