Built motion from commit a61a4a20.|2.5.46
[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 _0x1f26=['rimraf','../../config/environment','./openchannelInteraction.attributes','define','utf8mb4','utf8mb4_unicode_ci','changed','closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','lodash','util','../../config/logger','api','moment','bluebird','request-promise'];(function(_0x4f2a2d,_0xe07b11){var _0x5d2b35=function(_0x49cc54){while(--_0x49cc54){_0x4f2a2d['push'](_0x4f2a2d['shift']());}};_0x5d2b35(++_0xe07b11);}(_0x1f26,0x197));var _0x61f2=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x1f26[_0x321bb2];return _0x9c12ed;};'use strict';var _=require(_0x61f2('0x0'));var util=require(_0x61f2('0x1'));var logger=require(_0x61f2('0x2'))(_0x61f2('0x3'));var moment=require(_0x61f2('0x4'));var BPromise=require(_0x61f2('0x5'));var rp=require(_0x61f2('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0x61f2('0x7'));var config=require(_0x61f2('0x8'));var attributes=require(_0x61f2('0x9'));module['exports']=function(_0x67e3ed,_0x5e3428){return _0x67e3ed[_0x61f2('0xa')]('OpenchannelInteraction',attributes,{'tableName':'openchannel_interactions','paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x61f2('0xb'),'collate':_0x61f2('0xc'),'hooks':{'beforeUpdate':function(_0x160dd2,_0x2ef9f2,_0x2587b2){if(_0x160dd2[_0x61f2('0xd')](_0x61f2('0xe'))){_0x160dd2[_0x61f2('0xf')]=moment()[_0x61f2('0x10')](_0x61f2('0x11'));}_0x2587b2(null,_0x160dd2);}}});};