Built motion from commit (unavailable).|2.5.14
[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 _0x566a=['closedAt','format','YYYY-MM-DD\x20HH:mm:ss','lodash','api','bluebird','request-promise','../../config/environment','./faxInteraction.attributes','exports','fax_interactions'];(function(_0xf51c06,_0x388e5b){var _0x1d5420=function(_0x5e077b){while(--_0x5e077b){_0xf51c06['push'](_0xf51c06['shift']());}};_0x1d5420(++_0x388e5b);}(_0x566a,0xf5));var _0xa566=function(_0x30dc3b,_0x56e474){_0x30dc3b=_0x30dc3b-0x0;var _0x592c4a=_0x566a[_0x30dc3b];return _0x592c4a;};'use strict';var _=require(_0xa566('0x0'));var util=require('util');var logger=require('../../config/logger')(_0xa566('0x1'));var moment=require('moment');var BPromise=require(_0xa566('0x2'));var rp=require(_0xa566('0x3'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0xa566('0x4'));var attributes=require(_0xa566('0x5'));module[_0xa566('0x6')]=function(_0x47ec25,_0x107bcc){return _0x47ec25['define']('FaxInteraction',attributes,{'tableName':_0xa566('0x7'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x37ae0e,_0x4d5bd0,_0x58bd31){if(_0x37ae0e['changed']('closed')){_0x37ae0e[_0xa566('0x8')]=moment()[_0xa566('0x9')](_0xa566('0xa'));}_0x58bd31(null,_0x37ae0e);}}});};