Built motion from commit 85328c08.|2.5.50
[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 _0x1c2a=['api','moment','bluebird','path','../../config/environment','exports','define','OpenchannelInteraction','openchannel_interactions','utf8mb4','utf8mb4_unicode_ci','closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','lodash','util','../../config/logger'];(function(_0x443e79,_0x351b9f){var _0x9fe83c=function(_0x68e500){while(--_0x68e500){_0x443e79['push'](_0x443e79['shift']());}};_0x9fe83c(++_0x351b9f);}(_0x1c2a,0xc3));var _0xa1c2=function(_0x2de549,_0x2d890d){_0x2de549=_0x2de549-0x0;var _0x397132=_0x1c2a[_0x2de549];return _0x397132;};'use strict';var _=require(_0xa1c2('0x0'));var util=require(_0xa1c2('0x1'));var logger=require(_0xa1c2('0x2'))(_0xa1c2('0x3'));var moment=require(_0xa1c2('0x4'));var BPromise=require(_0xa1c2('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xa1c2('0x6'));var rimraf=require('rimraf');var config=require(_0xa1c2('0x7'));var attributes=require('./openchannelInteraction.attributes');module[_0xa1c2('0x8')]=function(_0x70fa40,_0x1d61b7){return _0x70fa40[_0xa1c2('0x9')](_0xa1c2('0xa'),attributes,{'tableName':_0xa1c2('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xa1c2('0xc'),'collate':_0xa1c2('0xd'),'hooks':{'beforeUpdate':function(_0x1cac64,_0x1539c1,_0x575346){if(_0x1cac64['changed'](_0xa1c2('0xe'))){_0x1cac64[_0xa1c2('0xf')]=moment()[_0xa1c2('0x10')](_0xa1c2('0x11'));}_0x575346(null,_0x1cac64);}}});};