Built motion from commit e1760111.|2.6.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 _0x3e6f=['lodash','util','../../config/logger','api','moment','bluebird','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'];(function(_0x17d2f0,_0x3f7f7e){var _0x123d98=function(_0x35c5ee){while(--_0x35c5ee){_0x17d2f0['push'](_0x17d2f0['shift']());}};_0x123d98(++_0x3f7f7e);}(_0x3e6f,0x17c));var _0xf3e6=function(_0x2c8d29,_0x4ed6b5){_0x2c8d29=_0x2c8d29-0x0;var _0x4262d3=_0x3e6f[_0x2c8d29];return _0x4262d3;};'use strict';var _=require(_0xf3e6('0x0'));var util=require(_0xf3e6('0x1'));var logger=require(_0xf3e6('0x2'))(_0xf3e6('0x3'));var moment=require(_0xf3e6('0x4'));var BPromise=require(_0xf3e6('0x5'));var rp=require(_0xf3e6('0x6'));var fs=require('fs');var path=require(_0xf3e6('0x7'));var rimraf=require(_0xf3e6('0x8'));var config=require(_0xf3e6('0x9'));var attributes=require(_0xf3e6('0xa'));module[_0xf3e6('0xb')]=function(_0x40f66f,_0x410b17){return _0x40f66f[_0xf3e6('0xc')]('ChatInteraction',attributes,{'tableName':_0xf3e6('0xd'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x28efe6,_0x4dacbd,_0x44e303){if(_0x28efe6[_0xf3e6('0xe')](_0xf3e6('0xf'))){_0x28efe6[_0xf3e6('0x10')]=moment()[_0xf3e6('0x11')](_0xf3e6('0x12'));}_0x44e303(null,_0x28efe6);}},'charset':'utf8mb4','collate':_0xf3e6('0x13')});};