Built motion from commit 0900f080.|2.5.45
[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 _0x09e0=['chat_interactions','closedAt','YYYY-MM-DD\x20HH:mm:ss','utf8mb4','lodash','util','../../config/logger','api','moment','request-promise','path','rimraf','../../config/environment','./chatInteraction.attributes','exports','define','ChatInteraction'];(function(_0x550de5,_0x27837d){var _0x236281=function(_0x4759b8){while(--_0x4759b8){_0x550de5['push'](_0x550de5['shift']());}};_0x236281(++_0x27837d);}(_0x09e0,0x6a));var _0x009e=function(_0x366013,_0x595e06){_0x366013=_0x366013-0x0;var _0x4e3613=_0x09e0[_0x366013];return _0x4e3613;};'use strict';var _=require(_0x009e('0x0'));var util=require(_0x009e('0x1'));var logger=require(_0x009e('0x2'))(_0x009e('0x3'));var moment=require(_0x009e('0x4'));var BPromise=require('bluebird');var rp=require(_0x009e('0x5'));var fs=require('fs');var path=require(_0x009e('0x6'));var rimraf=require(_0x009e('0x7'));var config=require(_0x009e('0x8'));var attributes=require(_0x009e('0x9'));module[_0x009e('0xa')]=function(_0x12f3b1,_0x4100ae){return _0x12f3b1[_0x009e('0xb')](_0x009e('0xc'),attributes,{'tableName':_0x009e('0xd'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x20fe54,_0x262af0,_0x5bab99){if(_0x20fe54['changed']('closed')){_0x20fe54[_0x009e('0xe')]=moment()['format'](_0x009e('0xf'));}_0x5bab99(null,_0x20fe54);}},'charset':_0x009e('0x10'),'collate':'utf8mb4_unicode_ci'});};