Built motion from commit 753c950e.|2.5.42
[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 _0xf820=['define','OpenchannelInteraction','utf8mb4_unicode_ci','closed','closedAt','format','lodash','util','../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment','./openchannelInteraction.attributes'];(function(_0x318ff4,_0x5913d6){var _0x20f3b0=function(_0x32c5e4){while(--_0x32c5e4){_0x318ff4['push'](_0x318ff4['shift']());}};_0x20f3b0(++_0x5913d6);}(_0xf820,0x86));var _0x0f82=function(_0x5af6d9,_0x1a6463){_0x5af6d9=_0x5af6d9-0x0;var _0x1c7d7c=_0xf820[_0x5af6d9];return _0x1c7d7c;};'use strict';var _=require(_0x0f82('0x0'));var util=require(_0x0f82('0x1'));var logger=require(_0x0f82('0x2'))('api');var moment=require(_0x0f82('0x3'));var BPromise=require(_0x0f82('0x4'));var rp=require(_0x0f82('0x5'));var fs=require('fs');var path=require(_0x0f82('0x6'));var rimraf=require(_0x0f82('0x7'));var config=require(_0x0f82('0x8'));var attributes=require(_0x0f82('0x9'));module['exports']=function(_0x169e1c,_0x3c8dd5){return _0x169e1c[_0x0f82('0xa')](_0x0f82('0xb'),attributes,{'tableName':'openchannel_interactions','paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':_0x0f82('0xc'),'hooks':{'beforeUpdate':function(_0x4a186b,_0x4183b3,_0x22a121){if(_0x4a186b['changed'](_0x0f82('0xd'))){_0x4a186b[_0x0f82('0xe')]=moment()[_0x0f82('0xf')]('YYYY-MM-DD\x20HH:mm:ss');}_0x22a121(null,_0x4a186b);}}});};