da35f2e5645a213b8e5b4a840773fd7749fe93de
[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 _0xd3a7=['define','utf8mb4','utf8mb4_unicode_ci','closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','lodash','util','../../config/logger','api','moment','request-promise','path','../../config/environment','exports'];(function(_0x5743d9,_0x506537){var _0x2bcd90=function(_0x2474bd){while(--_0x2474bd){_0x5743d9['push'](_0x5743d9['shift']());}};_0x2bcd90(++_0x506537);}(_0xd3a7,0x107));var _0x7d3a=function(_0x65123b,_0x1daec1){_0x65123b=_0x65123b-0x0;var _0x527096=_0xd3a7[_0x65123b];return _0x527096;};'use strict';var _=require(_0x7d3a('0x0'));var util=require(_0x7d3a('0x1'));var logger=require(_0x7d3a('0x2'))(_0x7d3a('0x3'));var moment=require(_0x7d3a('0x4'));var BPromise=require('bluebird');var rp=require(_0x7d3a('0x5'));var fs=require('fs');var path=require(_0x7d3a('0x6'));var rimraf=require('rimraf');var config=require(_0x7d3a('0x7'));var attributes=require('./openchannelInteraction.attributes');module[_0x7d3a('0x8')]=function(_0x1471d0,_0x18ea62){return _0x1471d0[_0x7d3a('0x9')]('OpenchannelInteraction',attributes,{'tableName':'openchannel_interactions','paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x7d3a('0xa'),'collate':_0x7d3a('0xb'),'hooks':{'beforeUpdate':function(_0x31bdc8,_0x528abb,_0x1044ca){if(_0x31bdc8['changed'](_0x7d3a('0xc'))){_0x31bdc8[_0x7d3a('0xd')]=moment()[_0x7d3a('0xe')](_0x7d3a('0xf'));}_0x1044ca(null,_0x31bdc8);}}});};