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 _0x112f=['save','update','remove','emit','hasOwnProperty','hook','exports','events','FaxAccount'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x112f,0x11e));var _0xf112=function(_0x428018,_0x2e3229){_0x428018=_0x428018-0x0;var _0x49fefa=_0x112f[_0x428018];return _0x49fefa;};'use strict';var EventEmitter=require(_0xf112('0x0'));var FaxAccount=require('../../mysqldb')['db'][_0xf112('0x1')];var FaxAccountEvents=new EventEmitter();FaxAccountEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xf112('0x2'),'afterUpdate':_0xf112('0x3'),'afterDestroy':_0xf112('0x4')};function emitEvent(_0x422467){return function(_0x584bbb,_0x44a5f1,_0x4e7d6b){FaxAccountEvents[_0xf112('0x5')](_0x422467+':'+_0x584bbb['id'],_0x584bbb);FaxAccountEvents[_0xf112('0x5')](_0x422467,_0x584bbb);_0x4e7d6b(null);};}for(var e in events){if(events[_0xf112('0x6')](e)){var event=events[e];FaxAccount[_0xf112('0x7')](e,emitEvent(event));}}module[_0xf112('0x8')]=FaxAccountEvents;