Built motion from commit (unavailable).|2.5.19
[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 _0xb934=['format','YYYY-MM-DD\x20HH:mm:ss','lodash','util','../../config/logger','moment','bluebird','request-promise','path','rimraf','exports','define','openchannel_interactions','changed','closed','closedAt'];(function(_0x251e8c,_0x277c33){var _0x1e0c1d=function(_0x20b89c){while(--_0x20b89c){_0x251e8c['push'](_0x251e8c['shift']());}};_0x1e0c1d(++_0x277c33);}(_0xb934,0x92));var _0x4b93=function(_0x150e88,_0x365833){_0x150e88=_0x150e88-0x0;var _0x2ea441=_0xb934[_0x150e88];return _0x2ea441;};'use strict';var _=require(_0x4b93('0x0'));var util=require(_0x4b93('0x1'));var logger=require(_0x4b93('0x2'))('api');var moment=require(_0x4b93('0x3'));var BPromise=require(_0x4b93('0x4'));var rp=require(_0x4b93('0x5'));var fs=require('fs');var path=require(_0x4b93('0x6'));var rimraf=require(_0x4b93('0x7'));var config=require('../../config/environment');var attributes=require('./openchannelInteraction.attributes');module[_0x4b93('0x8')]=function(_0x1fa8af,_0x2ea5ad){return _0x1fa8af[_0x4b93('0x9')]('OpenchannelInteraction',attributes,{'tableName':_0x4b93('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x20d624,_0x36cdc8,_0xa7f4c2){if(_0x20d624[_0x4b93('0xb')](_0x4b93('0xc'))){_0x20d624[_0x4b93('0xd')]=moment()[_0x4b93('0xe')](_0x4b93('0xf'));}_0xa7f4c2(null,_0x20d624);}}});};