Built motion from commit (unavailable).|2.5.15
[motion2.git] / server / api / chatInteraction / chatInteraction.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 _0x406a=['ChatInteraction','chat_interactions','changed','closed','format','YYYY-MM-DD\x20HH:mm:ss','utf8mb4','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./chatInteraction.attributes','exports','define'];(function(_0x5bacc4,_0x2dd404){var _0x2fce18=function(_0x98a293){while(--_0x98a293){_0x5bacc4['push'](_0x5bacc4['shift']());}};_0x2fce18(++_0x2dd404);}(_0x406a,0xbb));var _0xa406=function(_0x1573ea,_0x434f02){_0x1573ea=_0x1573ea-0x0;var _0x51c0e2=_0x406a[_0x1573ea];return _0x51c0e2;};'use strict';var _=require(_0xa406('0x0'));var util=require(_0xa406('0x1'));var logger=require(_0xa406('0x2'))(_0xa406('0x3'));var moment=require(_0xa406('0x4'));var BPromise=require(_0xa406('0x5'));var rp=require(_0xa406('0x6'));var fs=require('fs');var path=require(_0xa406('0x7'));var rimraf=require(_0xa406('0x8'));var config=require(_0xa406('0x9'));var attributes=require(_0xa406('0xa'));module[_0xa406('0xb')]=function(_0x55f847,_0x4a57df){return _0x55f847[_0xa406('0xc')](_0xa406('0xd'),attributes,{'tableName':_0xa406('0xe'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x12262f,_0x171ef7,_0x49c083){if(_0x12262f[_0xa406('0xf')](_0xa406('0x10'))){_0x12262f['closedAt']=moment()[_0xa406('0x11')](_0xa406('0x12'));}_0x49c083(null,_0x12262f);}},'charset':_0xa406('0x13'),'collate':'utf8mb4_unicode_ci'});};