Built motion from commit (unavailable).|2.5.13
[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 _0xa074=['api','moment','bluebird','request-promise','path','rimraf','./faxInteraction.attributes','exports','define','fax_interactions','changed','closed','format','YYYY-MM-DD\x20HH:mm:ss','../../config/logger'];(function(_0x5308f6,_0x583e8a){var _0x108af4=function(_0x1c412d){while(--_0x1c412d){_0x5308f6['push'](_0x5308f6['shift']());}};_0x108af4(++_0x583e8a);}(_0xa074,0x95));var _0x4a07=function(_0x46e363,_0x45d7e2){_0x46e363=_0x46e363-0x0;var _0x3fb059=_0xa074[_0x46e363];return _0x3fb059;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x4a07('0x0'))(_0x4a07('0x1'));var moment=require(_0x4a07('0x2'));var BPromise=require(_0x4a07('0x3'));var rp=require(_0x4a07('0x4'));var fs=require('fs');var path=require(_0x4a07('0x5'));var rimraf=require(_0x4a07('0x6'));var config=require('../../config/environment');var attributes=require(_0x4a07('0x7'));module[_0x4a07('0x8')]=function(_0x1a5b26,_0x4262f3){return _0x1a5b26[_0x4a07('0x9')]('FaxInteraction',attributes,{'tableName':_0x4a07('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x5beca4,_0x2779c0,_0x50d564){if(_0x5beca4[_0x4a07('0xb')](_0x4a07('0xc'))){_0x5beca4['closedAt']=moment()[_0x4a07('0xd')](_0x4a07('0xe'));}_0x50d564(null,_0x5beca4);}}});};