Built motion from commit (unavailable).|2.5.9
[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 _0x72ea=['FaxInteraction','closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','lodash','util','../../config/logger','api','bluebird','exports','define'];(function(_0x1e596f,_0x5adb1d){var _0x5a66ff=function(_0x2766c1){while(--_0x2766c1){_0x1e596f['push'](_0x1e596f['shift']());}};_0x5a66ff(++_0x5adb1d);}(_0x72ea,0x1e5));var _0xa72e=function(_0x576c81,_0x550f51){_0x576c81=_0x576c81-0x0;var _0x2eb6c0=_0x72ea[_0x576c81];return _0x2eb6c0;};'use strict';var _=require(_0xa72e('0x0'));var util=require(_0xa72e('0x1'));var logger=require(_0xa72e('0x2'))(_0xa72e('0x3'));var moment=require('moment');var BPromise=require(_0xa72e('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require('./faxInteraction.attributes');module[_0xa72e('0x5')]=function(_0xbdb5de,_0x57fccf){return _0xbdb5de[_0xa72e('0x6')](_0xa72e('0x7'),attributes,{'tableName':'fax_interactions','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x17b084,_0x2fafe0,_0xc66c8f){if(_0x17b084['changed'](_0xa72e('0x8'))){_0x17b084[_0xa72e('0x9')]=moment()[_0xa72e('0xa')](_0xa72e('0xb'));}_0xc66c8f(null,_0x17b084);}}});};