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 _0xb6fa=['hook','exports','events','setMaxListeners','remove','emit','hasOwnProperty'];(function(_0x26fd09,_0x1fb706){var _0x6959b2=function(_0x514aa2){while(--_0x514aa2){_0x26fd09['push'](_0x26fd09['shift']());}};_0x6959b2(++_0x1fb706);}(_0xb6fa,0x1c2));var _0xab6f=function(_0x15ea09,_0x2f30ab){_0x15ea09=_0x15ea09-0x0;var _0x3e9c78=_0xb6fa[_0x15ea09];return _0x3e9c78;};'use strict';var EventEmitter=require(_0xab6f('0x0'));var FaxAccount=require('../../mysqldb')['db']['FaxAccount'];var FaxAccountEvents=new EventEmitter();FaxAccountEvents[_0xab6f('0x1')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0xab6f('0x2')};function emitEvent(_0x437f7d){return function(_0x5c3230,_0x143af7,_0x45317f){FaxAccountEvents[_0xab6f('0x3')](_0x437f7d+':'+_0x5c3230['id'],_0x5c3230);FaxAccountEvents[_0xab6f('0x3')](_0x437f7d,_0x5c3230);_0x45317f(null);};}for(var e in events){if(events[_0xab6f('0x4')](e)){var event=events[e];FaxAccount[_0xab6f('0x5')](e,emitEvent(event));}}module[_0xab6f('0x6')]=FaxAccountEvents;