feb5525b17d922909cee41c494cf4f0c59bd59ea
[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 _0x6f8e=['closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','lodash','util','../../config/logger','moment','path','rimraf','../../config/environment','./openchannelInteraction.attributes','exports','define','openchannel_interactions','utf8mb4','utf8mb4_unicode_ci','changed'];(function(_0x4a6b3f,_0x5df361){var _0x1c7b4a=function(_0x471f20){while(--_0x471f20){_0x4a6b3f['push'](_0x4a6b3f['shift']());}};_0x1c7b4a(++_0x5df361);}(_0x6f8e,0x15a));var _0xe6f8=function(_0x5b644e,_0x2e5e07){_0x5b644e=_0x5b644e-0x0;var _0x49c6bf=_0x6f8e[_0x5b644e];return _0x49c6bf;};'use strict';var _=require(_0xe6f8('0x0'));var util=require(_0xe6f8('0x1'));var logger=require(_0xe6f8('0x2'))('api');var moment=require(_0xe6f8('0x3'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0xe6f8('0x4'));var rimraf=require(_0xe6f8('0x5'));var config=require(_0xe6f8('0x6'));var attributes=require(_0xe6f8('0x7'));module[_0xe6f8('0x8')]=function(_0x2ff15f,_0x14108f){return _0x2ff15f[_0xe6f8('0x9')]('OpenchannelInteraction',attributes,{'tableName':_0xe6f8('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xe6f8('0xb'),'collate':_0xe6f8('0xc'),'hooks':{'beforeUpdate':function(_0x1524dd,_0x4e9981,_0x233777){if(_0x1524dd[_0xe6f8('0xd')](_0xe6f8('0xe'))){_0x1524dd[_0xe6f8('0xf')]=moment()[_0xe6f8('0x10')](_0xe6f8('0x11'));}_0x233777(null,_0x1524dd);}}});};