Built motion from commit (unavailable).|2.5.14
[motion2.git] / server / api / openchannelInteraction / openchannelInteraction.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 _0x33c5=['exports','define','OpenchannelInteraction','openchannel_interactions','changed','closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','util','../../config/logger','moment','bluebird','request-promise','path','rimraf','./openchannelInteraction.attributes'];(function(_0x1da527,_0x2dc953){var _0x40fc7c=function(_0x9949f5){while(--_0x9949f5){_0x1da527['push'](_0x1da527['shift']());}};_0x40fc7c(++_0x2dc953);}(_0x33c5,0xe6));var _0x533c=function(_0x146a97,_0x2d8483){_0x146a97=_0x146a97-0x0;var _0x259d5c=_0x33c5[_0x146a97];return _0x259d5c;};'use strict';var _=require('lodash');var util=require(_0x533c('0x0'));var logger=require(_0x533c('0x1'))('api');var moment=require(_0x533c('0x2'));var BPromise=require(_0x533c('0x3'));var rp=require(_0x533c('0x4'));var fs=require('fs');var path=require(_0x533c('0x5'));var rimraf=require(_0x533c('0x6'));var config=require('../../config/environment');var attributes=require(_0x533c('0x7'));module[_0x533c('0x8')]=function(_0x31d912,_0x151732){return _0x31d912[_0x533c('0x9')](_0x533c('0xa'),attributes,{'tableName':_0x533c('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x36d74e,_0x2c297c,_0x1b929b){if(_0x36d74e[_0x533c('0xc')](_0x533c('0xd'))){_0x36d74e[_0x533c('0xe')]=moment()[_0x533c('0xf')](_0x533c('0x10'));}_0x1b929b(null,_0x36d74e);}}});};