Built motion from commit 9d0783e6.|2.6.13
[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 _0x78d3=['exports','openchannel_interactions','utf8mb4_unicode_ci','changed','closed','format','YYYY-MM-DD\x20HH:mm:ss','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./openchannelInteraction.attributes'];(function(_0x3a4425,_0x1de5cb){var _0x26976d=function(_0x32135a){while(--_0x32135a){_0x3a4425['push'](_0x3a4425['shift']());}};_0x26976d(++_0x1de5cb);}(_0x78d3,0x73));var _0x378d=function(_0xa72bc8,_0x1be9ba){_0xa72bc8=_0xa72bc8-0x0;var _0x163d97=_0x78d3[_0xa72bc8];return _0x163d97;};'use strict';var _=require(_0x378d('0x0'));var util=require(_0x378d('0x1'));var logger=require(_0x378d('0x2'))(_0x378d('0x3'));var moment=require(_0x378d('0x4'));var BPromise=require(_0x378d('0x5'));var rp=require(_0x378d('0x6'));var fs=require('fs');var path=require(_0x378d('0x7'));var rimraf=require(_0x378d('0x8'));var config=require(_0x378d('0x9'));var attributes=require(_0x378d('0xa'));module[_0x378d('0xb')]=function(_0xc18c0b,_0x59117c){return _0xc18c0b['define']('OpenchannelInteraction',attributes,{'tableName':_0x378d('0xc'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':_0x378d('0xd'),'hooks':{'beforeUpdate':function(_0x19beb8,_0x3bab19,_0x4698d9){if(_0x19beb8[_0x378d('0xe')](_0x378d('0xf'))){_0x19beb8['closedAt']=moment()[_0x378d('0x10')](_0x378d('0x11'));}_0x4698d9(null,_0x19beb8);}}});};