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 _0x407e=['remove','emit','hasOwnProperty','hook','events','../../mysqldb','FaxAccount','save','update'];(function(_0x5dcd28,_0x12adf2){var _0x1016f9=function(_0x386ade){while(--_0x386ade){_0x5dcd28['push'](_0x5dcd28['shift']());}};_0x1016f9(++_0x12adf2);}(_0x407e,0xca));var _0xe407=function(_0x41c88c,_0x381f8d){_0x41c88c=_0x41c88c-0x0;var _0x2c97ea=_0x407e[_0x41c88c];return _0x2c97ea;};'use strict';var EventEmitter=require(_0xe407('0x0'));var FaxAccount=require(_0xe407('0x1'))['db'][_0xe407('0x2')];var FaxAccountEvents=new EventEmitter();FaxAccountEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xe407('0x3'),'afterUpdate':_0xe407('0x4'),'afterDestroy':_0xe407('0x5')};function emitEvent(_0x23cd92){return function(_0x5e6aa9,_0x5ef293,_0x5a417d){FaxAccountEvents[_0xe407('0x6')](_0x23cd92+':'+_0x5e6aa9['id'],_0x5e6aa9);FaxAccountEvents[_0xe407('0x6')](_0x23cd92,_0x5e6aa9);_0x5a417d(null);};}for(var e in events){if(events[_0xe407('0x7')](e)){var event=events[e];FaxAccount[_0xe407('0x8')](e,emitEvent(event));}}module['exports']=FaxAccountEvents;