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 _0x677c=['setMaxListeners','update','remove','emit','hasOwnProperty','hook','exports','FaxAccount'];(function(_0x214b24,_0x311412){var _0x21506a=function(_0x5f5c51){while(--_0x5f5c51){_0x214b24['push'](_0x214b24['shift']());}};_0x21506a(++_0x311412);}(_0x677c,0x187));var _0xc677=function(_0x1655c4,_0x50838c){_0x1655c4=_0x1655c4-0x0;var _0x50493b=_0x677c[_0x1655c4];return _0x50493b;};'use strict';var EventEmitter=require('events');var FaxAccount=require('../../mysqldb')['db'][_0xc677('0x0')];var FaxAccountEvents=new EventEmitter();FaxAccountEvents[_0xc677('0x1')](0x0);var events={'afterCreate':'save','afterUpdate':_0xc677('0x2'),'afterDestroy':_0xc677('0x3')};function emitEvent(_0x20a0e8){return function(_0x444e7e,_0x577e6b,_0x13f450){FaxAccountEvents[_0xc677('0x4')](_0x20a0e8+':'+_0x444e7e['id'],_0x444e7e);FaxAccountEvents[_0xc677('0x4')](_0x20a0e8,_0x444e7e);_0x13f450(null);};}for(var e in events){if(events[_0xc677('0x5')](e)){var event=events[e];FaxAccount[_0xc677('0x6')](e,emitEvent(event));}}module[_0xc677('0x7')]=FaxAccountEvents;