Built motion from commit (unavailable).|2.5.1
[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 _0xbcc7=['rimraf','../../config/environment','./faxInteraction.attributes','exports','FaxInteraction','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path'];(function(_0x3e284d,_0x42c938){var _0x278746=function(_0xde3859){while(--_0xde3859){_0x3e284d['push'](_0x3e284d['shift']());}};_0x278746(++_0x42c938);}(_0xbcc7,0x1e8));var _0x7bcc=function(_0x4e8abe,_0x3b8719){_0x4e8abe=_0x4e8abe-0x0;var _0x162e4a=_0xbcc7[_0x4e8abe];return _0x162e4a;};'use strict';var _=require(_0x7bcc('0x0'));var util=require(_0x7bcc('0x1'));var logger=require(_0x7bcc('0x2'))(_0x7bcc('0x3'));var moment=require(_0x7bcc('0x4'));var BPromise=require(_0x7bcc('0x5'));var rp=require(_0x7bcc('0x6'));var fs=require('fs');var path=require(_0x7bcc('0x7'));var rimraf=require(_0x7bcc('0x8'));var config=require(_0x7bcc('0x9'));var attributes=require(_0x7bcc('0xa'));module[_0x7bcc('0xb')]=function(_0x25d0ad,_0x532dd4){return _0x25d0ad['define'](_0x7bcc('0xc'),attributes,{'tableName':'fax_interactions','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x10ea62,_0x82b12b,_0x4db86d){if(_0x10ea62['changed']('closed')){_0x10ea62[_0x7bcc('0xd')]=moment()[_0x7bcc('0xe')](_0x7bcc('0xf'));}_0x4db86d(null,_0x10ea62);}}});};