014a03001e820934f54136a76dbfeb781d2b5fa9
[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 _0xd9ce=['format','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','../../config/environment','./openchannelInteraction.attributes','exports','define','openchannel_interactions','utf8mb4','changed','closed','closedAt'];(function(_0x264b9b,_0xa1181e){var _0x4c7a0e=function(_0x4b77a0){while(--_0x4b77a0){_0x264b9b['push'](_0x264b9b['shift']());}};_0x4c7a0e(++_0xa1181e);}(_0xd9ce,0xeb));var _0xed9c=function(_0x561771,_0x554760){_0x561771=_0x561771-0x0;var _0x54d16e=_0xd9ce[_0x561771];return _0x54d16e;};'use strict';var _=require(_0xed9c('0x0'));var util=require(_0xed9c('0x1'));var logger=require(_0xed9c('0x2'))(_0xed9c('0x3'));var moment=require(_0xed9c('0x4'));var BPromise=require(_0xed9c('0x5'));var rp=require(_0xed9c('0x6'));var fs=require('fs');var path=require(_0xed9c('0x7'));var rimraf=require('rimraf');var config=require(_0xed9c('0x8'));var attributes=require(_0xed9c('0x9'));module[_0xed9c('0xa')]=function(_0x154e9d,_0x3043a6){return _0x154e9d[_0xed9c('0xb')]('OpenchannelInteraction',attributes,{'tableName':_0xed9c('0xc'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xed9c('0xd'),'collate':'utf8mb4_unicode_ci','hooks':{'beforeUpdate':function(_0x483ada,_0x2434d3,_0x5ed0ab){if(_0x483ada[_0xed9c('0xe')](_0xed9c('0xf'))){_0x483ada[_0xed9c('0x10')]=moment()[_0xed9c('0x11')]('YYYY-MM-DD\x20HH:mm:ss');}_0x5ed0ab(null,_0x483ada);}}});};