Built motion from commit (unavailable).|2.5.4
[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 _0xac7e=['lodash','util','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./chatInteraction.attributes','define','ChatInteraction','chat_interactions','closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','utf8mb4'];(function(_0x2c91e9,_0x2fb965){var _0x13f0ff=function(_0xb39edf){while(--_0xb39edf){_0x2c91e9['push'](_0x2c91e9['shift']());}};_0x13f0ff(++_0x2fb965);}(_0xac7e,0xa2));var _0xeac7=function(_0x54f315,_0x309904){_0x54f315=_0x54f315-0x0;var _0x1feb30=_0xac7e[_0x54f315];return _0x1feb30;};'use strict';var _=require(_0xeac7('0x0'));var util=require(_0xeac7('0x1'));var logger=require('../../config/logger')(_0xeac7('0x2'));var moment=require(_0xeac7('0x3'));var BPromise=require(_0xeac7('0x4'));var rp=require(_0xeac7('0x5'));var fs=require('fs');var path=require(_0xeac7('0x6'));var rimraf=require(_0xeac7('0x7'));var config=require(_0xeac7('0x8'));var attributes=require(_0xeac7('0x9'));module['exports']=function(_0x40bed1,_0x1d1cb8){return _0x40bed1[_0xeac7('0xa')](_0xeac7('0xb'),attributes,{'tableName':_0xeac7('0xc'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x4a8cc3,_0x55e9a0,_0x505bf2){if(_0x4a8cc3['changed'](_0xeac7('0xd'))){_0x4a8cc3[_0xeac7('0xe')]=moment()[_0xeac7('0xf')](_0xeac7('0x10'));}_0x505bf2(null,_0x4a8cc3);}},'charset':_0xeac7('0x11'),'collate':'utf8mb4_unicode_ci'});};