53d8a48976500741182d6e1451f34320968f942f
[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 _0x6fd5=['closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','utf8mb4','lodash','util','../../config/logger','moment','bluebird','path','rimraf','../../config/environment','./chatInteraction.attributes','define','chat_interactions','changed'];(function(_0x1b4ef6,_0x5a5199){var _0x39539e=function(_0x3a0b95){while(--_0x3a0b95){_0x1b4ef6['push'](_0x1b4ef6['shift']());}};_0x39539e(++_0x5a5199);}(_0x6fd5,0x19d));var _0x56fd=function(_0x5ddb1c,_0x5ea4df){_0x5ddb1c=_0x5ddb1c-0x0;var _0x354adc=_0x6fd5[_0x5ddb1c];return _0x354adc;};'use strict';var _=require(_0x56fd('0x0'));var util=require(_0x56fd('0x1'));var logger=require(_0x56fd('0x2'))('api');var moment=require(_0x56fd('0x3'));var BPromise=require(_0x56fd('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x56fd('0x5'));var rimraf=require(_0x56fd('0x6'));var config=require(_0x56fd('0x7'));var attributes=require(_0x56fd('0x8'));module['exports']=function(_0x26a3aa,_0x1404e0){return _0x26a3aa[_0x56fd('0x9')]('ChatInteraction',attributes,{'tableName':_0x56fd('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x28a2f6,_0x397a9d,_0x28538e){if(_0x28a2f6[_0x56fd('0xb')](_0x56fd('0xc'))){_0x28a2f6[_0x56fd('0xd')]=moment()[_0x56fd('0xe')](_0x56fd('0xf'));}_0x28538e(null,_0x28a2f6);}},'charset':_0x56fd('0x10'),'collate':'utf8mb4_unicode_ci'});};