Built motion from commit 87cd5f02.|2.5.48
[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 _0xce68=['bluebird','request-promise','rimraf','../../config/environment','./openchannelInteraction.attributes','openchannel_interactions','utf8mb4','utf8mb4_unicode_ci','changed','closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','lodash','../../config/logger','api','moment'];(function(_0x96c538,_0xc5e208){var _0x38f9d3=function(_0x45ae24){while(--_0x45ae24){_0x96c538['push'](_0x96c538['shift']());}};_0x38f9d3(++_0xc5e208);}(_0xce68,0x10c));var _0x8ce6=function(_0x35f4c1,_0x3e38ff){_0x35f4c1=_0x35f4c1-0x0;var _0xd8226a=_0xce68[_0x35f4c1];return _0xd8226a;};'use strict';var _=require(_0x8ce6('0x0'));var util=require('util');var logger=require(_0x8ce6('0x1'))(_0x8ce6('0x2'));var moment=require(_0x8ce6('0x3'));var BPromise=require(_0x8ce6('0x4'));var rp=require(_0x8ce6('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x8ce6('0x6'));var config=require(_0x8ce6('0x7'));var attributes=require(_0x8ce6('0x8'));module['exports']=function(_0x116e0a,_0x10b3ca){return _0x116e0a['define']('OpenchannelInteraction',attributes,{'tableName':_0x8ce6('0x9'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x8ce6('0xa'),'collate':_0x8ce6('0xb'),'hooks':{'beforeUpdate':function(_0x258d09,_0x5adb5a,_0x417bcf){if(_0x258d09[_0x8ce6('0xc')](_0x8ce6('0xd'))){_0x258d09[_0x8ce6('0xe')]=moment()[_0x8ce6('0xf')](_0x8ce6('0x10'));}_0x417bcf(null,_0x258d09);}}});};