Built motion from commit b0a9a629.|2.6.33
[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 _0xa412=['lodash','util','api','moment','rimraf','./chatInteraction.attributes','exports','ChatInteraction','chat_interactions','changed','closed','closedAt','format','utf8mb4','utf8mb4_unicode_ci'];(function(_0x4f3e9f,_0xd1b662){var _0x2b0cd2=function(_0x22ec2a){while(--_0x22ec2a){_0x4f3e9f['push'](_0x4f3e9f['shift']());}};_0x2b0cd2(++_0xd1b662);}(_0xa412,0x159));var _0x2a41=function(_0x5168c6,_0x889c5e){_0x5168c6=_0x5168c6-0x0;var _0x594ea3=_0xa412[_0x5168c6];return _0x594ea3;};'use strict';var _=require(_0x2a41('0x0'));var util=require(_0x2a41('0x1'));var logger=require('../../config/logger')(_0x2a41('0x2'));var moment=require(_0x2a41('0x3'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x2a41('0x4'));var config=require('../../config/environment');var attributes=require(_0x2a41('0x5'));module[_0x2a41('0x6')]=function(_0x488dfc,_0x5383d3){return _0x488dfc['define'](_0x2a41('0x7'),attributes,{'tableName':_0x2a41('0x8'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0xd866ff,_0x429091,_0x518e20){if(_0xd866ff[_0x2a41('0x9')](_0x2a41('0xa'))){_0xd866ff[_0x2a41('0xb')]=moment()[_0x2a41('0xc')]('YYYY-MM-DD\x20HH:mm:ss');}_0x518e20(null,_0xd866ff);}},'charset':_0x2a41('0xd'),'collate':_0x2a41('0xe')});};