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 _0x3f60=['update','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','FaxAccount','setMaxListeners','save'];(function(_0x17d9e3,_0x1f969c){var _0x14192d=function(_0x159745){while(--_0x159745){_0x17d9e3['push'](_0x17d9e3['shift']());}};_0x14192d(++_0x1f969c);}(_0x3f60,0x119));var _0x03f6=function(_0x77fd25,_0x226ea2){_0x77fd25=_0x77fd25-0x0;var _0xe14528=_0x3f60[_0x77fd25];return _0xe14528;};'use strict';var EventEmitter=require(_0x03f6('0x0'));var FaxAccount=require(_0x03f6('0x1'))['db'][_0x03f6('0x2')];var FaxAccountEvents=new EventEmitter();FaxAccountEvents[_0x03f6('0x3')](0x0);var events={'afterCreate':_0x03f6('0x4'),'afterUpdate':_0x03f6('0x5'),'afterDestroy':_0x03f6('0x6')};function emitEvent(_0x234b5d){return function(_0x537eb6,_0x2f0170,_0x4df0b2){FaxAccountEvents[_0x03f6('0x7')](_0x234b5d+':'+_0x537eb6['id'],_0x537eb6);FaxAccountEvents[_0x03f6('0x7')](_0x234b5d,_0x537eb6);_0x4df0b2(null);};}for(var e in events){if(events[_0x03f6('0x8')](e)){var event=events[e];FaxAccount[_0x03f6('0x9')](e,emitEvent(event));}}module[_0x03f6('0xa')]=FaxAccountEvents;