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 _0xde2e=['setMaxListeners','update','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb'];(function(_0x178e48,_0x3c9509){var _0x440d7e=function(_0xc2f8a0){while(--_0xc2f8a0){_0x178e48['push'](_0x178e48['shift']());}};_0x440d7e(++_0x3c9509);}(_0xde2e,0x142));var _0xede2=function(_0xd39959,_0x302d09){_0xd39959=_0xd39959-0x0;var _0x1ff69c=_0xde2e[_0xd39959];return _0x1ff69c;};'use strict';var EventEmitter=require(_0xede2('0x0'));var FaxAccount=require(_0xede2('0x1'))['db']['FaxAccount'];var FaxAccountEvents=new EventEmitter();FaxAccountEvents[_0xede2('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0xede2('0x3'),'afterDestroy':_0xede2('0x4')};function emitEvent(_0x13b9d7){return function(_0x30a390,_0x3da93d,_0x2ce50b){FaxAccountEvents[_0xede2('0x5')](_0x13b9d7+':'+_0x30a390['id'],_0x30a390);FaxAccountEvents[_0xede2('0x5')](_0x13b9d7,_0x30a390);_0x2ce50b(null);};}for(var e in events){if(events[_0xede2('0x6')](e)){var event=events[e];FaxAccount[_0xede2('0x7')](e,emitEvent(event));}}module[_0xede2('0x8')]=FaxAccountEvents;