a0eff80a56ed4998cc3ce2ba917863d73160068f
[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 _0xf75b=['rimraf','../../config/environment','./chatInteraction.attributes','define','ChatInteraction','chat_interactions','closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','lodash','util','../../config/logger','api','moment','request-promise'];(function(_0x5756c6,_0x58290a){var _0x4b5806=function(_0x193246){while(--_0x193246){_0x5756c6['push'](_0x5756c6['shift']());}};_0x4b5806(++_0x58290a);}(_0xf75b,0x13a));var _0xbf75=function(_0x21719a,_0x6e279){_0x21719a=_0x21719a-0x0;var _0x379194=_0xf75b[_0x21719a];return _0x379194;};'use strict';var _=require(_0xbf75('0x0'));var util=require(_0xbf75('0x1'));var logger=require(_0xbf75('0x2'))(_0xbf75('0x3'));var moment=require(_0xbf75('0x4'));var BPromise=require('bluebird');var rp=require(_0xbf75('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0xbf75('0x6'));var config=require(_0xbf75('0x7'));var attributes=require(_0xbf75('0x8'));module['exports']=function(_0x38c632,_0x2b333c){return _0x38c632[_0xbf75('0x9')](_0xbf75('0xa'),attributes,{'tableName':_0xbf75('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0xa483b5,_0x4acd75,_0x23d833){if(_0xa483b5['changed'](_0xbf75('0xc'))){_0xa483b5[_0xbf75('0xd')]=moment()[_0xbf75('0xe')](_0xbf75('0xf'));}_0x23d833(null,_0xa483b5);}},'charset':'utf8mb4','collate':'utf8mb4_unicode_ci'});};