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 _0x079c=['emit','hasOwnProperty','hook','exports','setMaxListeners','save','update','remove'];(function(_0x4fcbec,_0x90e467){var _0x275177=function(_0x1f706b){while(--_0x1f706b){_0x4fcbec['push'](_0x4fcbec['shift']());}};_0x275177(++_0x90e467);}(_0x079c,0x13c));var _0xc079=function(_0x3b9d22,_0x2aaa1b){_0x3b9d22=_0x3b9d22-0x0;var _0xddc59b=_0x079c[_0x3b9d22];return _0xddc59b;};'use strict';var EventEmitter=require('events');var OpenchannelAccount=require('../../mysqldb')['db']['OpenchannelAccount'];var OpenchannelAccountEvents=new EventEmitter();OpenchannelAccountEvents[_0xc079('0x0')](0x0);var events={'afterCreate':_0xc079('0x1'),'afterUpdate':_0xc079('0x2'),'afterDestroy':_0xc079('0x3')};function emitEvent(_0x1108db){return function(_0x373f4e,_0x4b9b02,_0x171baf){OpenchannelAccountEvents[_0xc079('0x4')](_0x1108db+':'+_0x373f4e['id'],_0x373f4e);OpenchannelAccountEvents[_0xc079('0x4')](_0x1108db,_0x373f4e);_0x171baf(null);};}for(var e in events){if(events[_0xc079('0x5')](e)){var event=events[e];OpenchannelAccount[_0xc079('0x6')](e,emitEvent(event));}}module[_0xc079('0x7')]=OpenchannelAccountEvents;