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 _0x70de=['save','update','remove','hasOwnProperty','hook','FaxAccount'];(function(_0x37e331,_0x5c5bb7){var _0x3b0b3d=function(_0x99a51f){while(--_0x99a51f){_0x37e331['push'](_0x37e331['shift']());}};_0x3b0b3d(++_0x5c5bb7);}(_0x70de,0xb3));var _0xe70d=function(_0x58ac34,_0x5b5bfb){_0x58ac34=_0x58ac34-0x0;var _0x3921ab=_0x70de[_0x58ac34];return _0x3921ab;};'use strict';var EventEmitter=require('events');var FaxAccount=require('../../mysqldb')['db'][_0xe70d('0x0')];var FaxAccountEvents=new EventEmitter();FaxAccountEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xe70d('0x1'),'afterUpdate':_0xe70d('0x2'),'afterDestroy':_0xe70d('0x3')};function emitEvent(_0x1c88d1){return function(_0x52a812,_0x312ab4,_0x1b6346){FaxAccountEvents['emit'](_0x1c88d1+':'+_0x52a812['id'],_0x52a812);FaxAccountEvents['emit'](_0x1c88d1,_0x52a812);_0x1b6346(null);};}for(var e in events){if(events[_0xe70d('0x4')](e)){var event=events[e];FaxAccount[_0xe70d('0x5')](e,emitEvent(event));}}module['exports']=FaxAccountEvents;