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 _0x7d87=['events','FaxAccount','setMaxListeners','save','update','remove','emit','hasOwnProperty'];(function(_0x38cbdf,_0x4eb95f){var _0x20ebce=function(_0x2e9721){while(--_0x2e9721){_0x38cbdf['push'](_0x38cbdf['shift']());}};_0x20ebce(++_0x4eb95f);}(_0x7d87,0x178));var _0x77d8=function(_0xfdb2df,_0x5517ff){_0xfdb2df=_0xfdb2df-0x0;var _0x42dc28=_0x7d87[_0xfdb2df];return _0x42dc28;};'use strict';var EventEmitter=require(_0x77d8('0x0'));var FaxAccount=require('../../mysqldb')['db'][_0x77d8('0x1')];var FaxAccountEvents=new EventEmitter();FaxAccountEvents[_0x77d8('0x2')](0x0);var events={'afterCreate':_0x77d8('0x3'),'afterUpdate':_0x77d8('0x4'),'afterDestroy':_0x77d8('0x5')};function emitEvent(_0xdd5dd2){return function(_0x539778,_0x3da7cd,_0x1e9096){FaxAccountEvents[_0x77d8('0x6')](_0xdd5dd2+':'+_0x539778['id'],_0x539778);FaxAccountEvents[_0x77d8('0x6')](_0xdd5dd2,_0x539778);_0x1e9096(null);};}for(var e in events){if(events[_0x77d8('0x7')](e)){var event=events[e];FaxAccount['hook'](e,emitEvent(event));}}module['exports']=FaxAccountEvents;