Built motion from commit (unavailable).|2.5.5
[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 _0xb694=['moment','bluebird','rimraf','../../config/environment','./faxInteraction.attributes','exports','FaxInteraction','fax_interactions','changed','closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','lodash','util','../../config/logger'];(function(_0x45d3f0,_0x4be53f){var _0x314b79=function(_0x563d32){while(--_0x563d32){_0x45d3f0['push'](_0x45d3f0['shift']());}};_0x314b79(++_0x4be53f);}(_0xb694,0xbd));var _0x4b69=function(_0x15bfbd,_0x21db6b){_0x15bfbd=_0x15bfbd-0x0;var _0x4d42c2=_0xb694[_0x15bfbd];return _0x4d42c2;};'use strict';var _=require(_0x4b69('0x0'));var util=require(_0x4b69('0x1'));var logger=require(_0x4b69('0x2'))('api');var moment=require(_0x4b69('0x3'));var BPromise=require(_0x4b69('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x4b69('0x5'));var config=require(_0x4b69('0x6'));var attributes=require(_0x4b69('0x7'));module[_0x4b69('0x8')]=function(_0x13a8c8,_0x278164){return _0x13a8c8['define'](_0x4b69('0x9'),attributes,{'tableName':_0x4b69('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x1a4944,_0x592a63,_0x41d407){if(_0x1a4944[_0x4b69('0xb')](_0x4b69('0xc'))){_0x1a4944[_0x4b69('0xd')]=moment()[_0x4b69('0xe')](_0x4b69('0xf'));}_0x41d407(null,_0x1a4944);}}});};