Built motion from commit (unavailable).|2.4.18
[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 _0xdce0=['request-promise','path','rimraf','../../config/environment','./chatInteraction.attributes','exports','define','chat_interactions','changed','closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','utf8mb4_unicode_ci','lodash','util','../../config/logger','moment'];(function(_0x9df060,_0x253d33){var _0x338dfe=function(_0x17d9a5){while(--_0x17d9a5){_0x9df060['push'](_0x9df060['shift']());}};_0x338dfe(++_0x253d33);}(_0xdce0,0x1be));var _0x0dce=function(_0x21280e,_0x578929){_0x21280e=_0x21280e-0x0;var _0x1d728b=_0xdce0[_0x21280e];return _0x1d728b;};'use strict';var _=require(_0x0dce('0x0'));var util=require(_0x0dce('0x1'));var logger=require(_0x0dce('0x2'))('api');var moment=require(_0x0dce('0x3'));var BPromise=require('bluebird');var rp=require(_0x0dce('0x4'));var fs=require('fs');var path=require(_0x0dce('0x5'));var rimraf=require(_0x0dce('0x6'));var config=require(_0x0dce('0x7'));var attributes=require(_0x0dce('0x8'));module[_0x0dce('0x9')]=function(_0x3c73b1,_0x403c89){return _0x3c73b1[_0x0dce('0xa')]('ChatInteraction',attributes,{'tableName':_0x0dce('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x1229d3,_0x452ca7,_0x48f090){if(_0x1229d3[_0x0dce('0xc')](_0x0dce('0xd'))){_0x1229d3[_0x0dce('0xe')]=moment()[_0x0dce('0xf')](_0x0dce('0x10'));}_0x48f090(null,_0x1229d3);}},'charset':'utf8mb4','collate':_0x0dce('0x11')});};