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 _0xa222=['save','update','remove','emit','hasOwnProperty','exports','events','FaxAccount','setMaxListeners'];(function(_0x272d90,_0x5e70ff){var _0x2bf4a2=function(_0x544da6){while(--_0x544da6){_0x272d90['push'](_0x272d90['shift']());}};_0x2bf4a2(++_0x5e70ff);}(_0xa222,0xde));var _0x2a22=function(_0x3a0863,_0x4cd5ef){_0x3a0863=_0x3a0863-0x0;var _0x85c557=_0xa222[_0x3a0863];return _0x85c557;};'use strict';var EventEmitter=require(_0x2a22('0x0'));var FaxAccount=require('../../mysqldb')['db'][_0x2a22('0x1')];var FaxAccountEvents=new EventEmitter();FaxAccountEvents[_0x2a22('0x2')](0x0);var events={'afterCreate':_0x2a22('0x3'),'afterUpdate':_0x2a22('0x4'),'afterDestroy':_0x2a22('0x5')};function emitEvent(_0x269053){return function(_0x5e16b7,_0x143a0e,_0x29e35b){FaxAccountEvents[_0x2a22('0x6')](_0x269053+':'+_0x5e16b7['id'],_0x5e16b7);FaxAccountEvents[_0x2a22('0x6')](_0x269053,_0x5e16b7);_0x29e35b(null);};}for(var e in events){if(events[_0x2a22('0x7')](e)){var event=events[e];FaxAccount['hook'](e,emitEvent(event));}}module[_0x2a22('0x8')]=FaxAccountEvents;