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 _0xc2fd=['save','emit','hasOwnProperty','hook','exports','events','../../mysqldb','FaxAccount','setMaxListeners'];(function(_0x558c38,_0x23d8ed){var _0x228dfa=function(_0x1a4832){while(--_0x1a4832){_0x558c38['push'](_0x558c38['shift']());}};_0x228dfa(++_0x23d8ed);}(_0xc2fd,0x12e));var _0xdc2f=function(_0x3ab51d,_0x2fa01d){_0x3ab51d=_0x3ab51d-0x0;var _0x29a04e=_0xc2fd[_0x3ab51d];return _0x29a04e;};'use strict';var EventEmitter=require(_0xdc2f('0x0'));var FaxAccount=require(_0xdc2f('0x1'))['db'][_0xdc2f('0x2')];var FaxAccountEvents=new EventEmitter();FaxAccountEvents[_0xdc2f('0x3')](0x0);var events={'afterCreate':_0xdc2f('0x4'),'afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x571374){return function(_0x2a6e1a,_0xb45cb9,_0x38c17b){FaxAccountEvents['emit'](_0x571374+':'+_0x2a6e1a['id'],_0x2a6e1a);FaxAccountEvents[_0xdc2f('0x5')](_0x571374,_0x2a6e1a);_0x38c17b(null);};}for(var e in events){if(events[_0xdc2f('0x6')](e)){var event=events[e];FaxAccount[_0xdc2f('0x7')](e,emitEvent(event));}}module[_0xdc2f('0x8')]=FaxAccountEvents;