1 // *************************************************************************
3 // * xCALLY Motion - The Omnichannel Contact Center *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved *
6 // *************************************************************************
8 // * Email: info@xcally.com *
9 // * Website: https://www.xcally.com *
11 // *************************************************************************
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. *
17 // *************************************************************************
18 var _0xbdb7=['save','update','remove','hasOwnProperty','hook','events','../../mysqldb','OpenchannelAccount','setMaxListeners'];(function(_0x5223a4,_0x5f477e){var _0x5ac416=function(_0x1e9f4e){while(--_0x1e9f4e){_0x5223a4['push'](_0x5223a4['shift']());}};_0x5ac416(++_0x5f477e);}(_0xbdb7,0x12e));var _0x7bdb=function(_0x18b20e,_0x46903c){_0x18b20e=_0x18b20e-0x0;var _0xadd3a9=_0xbdb7[_0x18b20e];return _0xadd3a9;};'use strict';var EventEmitter=require(_0x7bdb('0x0'));var OpenchannelAccount=require(_0x7bdb('0x1'))['db'][_0x7bdb('0x2')];var OpenchannelAccountEvents=new EventEmitter();OpenchannelAccountEvents[_0x7bdb('0x3')](0x0);var events={'afterCreate':_0x7bdb('0x4'),'afterUpdate':_0x7bdb('0x5'),'afterDestroy':_0x7bdb('0x6')};function emitEvent(_0x2c7e07){return function(_0x46c068,_0x47aec5,_0x28542c){OpenchannelAccountEvents['emit'](_0x2c7e07+':'+_0x46c068['id'],_0x46c068);OpenchannelAccountEvents['emit'](_0x2c7e07,_0x46c068);_0x28542c(null);};}for(var e in events){if(events[_0x7bdb('0x7')](e)){var event=events[e];OpenchannelAccount[_0x7bdb('0x8')](e,emitEvent(event));}}module['exports']=OpenchannelAccountEvents;