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 _0x525c=['SquareProject','setMaxListeners','update','remove','emit','hook'];(function(_0xbdfea6,_0x35472e){var _0x24a6b6=function(_0x19d85c){while(--_0x19d85c){_0xbdfea6['push'](_0xbdfea6['shift']());}};_0x24a6b6(++_0x35472e);}(_0x525c,0xb4));var _0xc525=function(_0x174ef5,_0x256e8e){_0x174ef5=_0x174ef5-0x0;var _0x1cc379=_0x525c[_0x174ef5];return _0x1cc379;};'use strict';var EventEmitter=require('events');var SquareProject=require('../../mysqldb')['db'][_0xc525('0x0')];var SquareProjectEvents=new EventEmitter();SquareProjectEvents[_0xc525('0x1')](0x0);var events={'afterCreate':'save','afterUpdate':_0xc525('0x2'),'afterDestroy':_0xc525('0x3')};function emitEvent(_0x5342f3){return function(_0x2b6d2c,_0x24609d,_0x5c8eb5){SquareProjectEvents[_0xc525('0x4')](_0x5342f3+':'+_0x2b6d2c['id'],_0x2b6d2c);SquareProjectEvents[_0xc525('0x4')](_0x5342f3,_0x2b6d2c);_0x5c8eb5(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];SquareProject[_0xc525('0x5')](e,emitEvent(event));}}module['exports']=SquareProjectEvents;