d67cd4ccd462d09781cbf507dfe1728168690900
[motion2.git] / server / api / openchannelInteraction / openchannelInteraction.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 _0x93f2=['closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','lodash','../../config/logger','api','moment','bluebird','request-promise','rimraf','./openchannelInteraction.attributes','exports','OpenchannelInteraction','utf8mb4'];(function(_0x23bf66,_0x2f57be){var _0xbf7653=function(_0x5b0f5c){while(--_0x5b0f5c){_0x23bf66['push'](_0x23bf66['shift']());}};_0xbf7653(++_0x2f57be);}(_0x93f2,0x15d));var _0x293f=function(_0x24f31b,_0x44b8f3){_0x24f31b=_0x24f31b-0x0;var _0x488401=_0x93f2[_0x24f31b];return _0x488401;};'use strict';var _=require(_0x293f('0x0'));var util=require('util');var logger=require(_0x293f('0x1'))(_0x293f('0x2'));var moment=require(_0x293f('0x3'));var BPromise=require(_0x293f('0x4'));var rp=require(_0x293f('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x293f('0x6'));var config=require('../../config/environment');var attributes=require(_0x293f('0x7'));module[_0x293f('0x8')]=function(_0x356b75,_0x1c39d0){return _0x356b75['define'](_0x293f('0x9'),attributes,{'tableName':'openchannel_interactions','paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x293f('0xa'),'collate':'utf8mb4_unicode_ci','hooks':{'beforeUpdate':function(_0x55666d,_0x130521,_0xd99581){if(_0x55666d['changed'](_0x293f('0xb'))){_0x55666d[_0x293f('0xc')]=moment()[_0x293f('0xd')](_0x293f('0xe'));}_0xd99581(null,_0x55666d);}}});};