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 _0x7955=['hasOwnProperty','hook','events','update','remove','emit'];(function(_0x114ca7,_0x2ce49d){var _0x169af2=function(_0xcfa101){while(--_0xcfa101){_0x114ca7['push'](_0x114ca7['shift']());}};_0x169af2(++_0x2ce49d);}(_0x7955,0x170));var _0x5795=function(_0x313324,_0x362720){_0x313324=_0x313324-0x0;var _0x4c9dec=_0x7955[_0x313324];return _0x4c9dec;};'use strict';var EventEmitter=require(_0x5795('0x0'));var SquareProject=require('../../mysqldb')['db']['SquareProject'];var SquareProjectEvents=new EventEmitter();SquareProjectEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0x5795('0x1'),'afterDestroy':_0x5795('0x2')};function emitEvent(_0x5a6664){return function(_0x599365,_0x4321a7,_0x4495c9){SquareProjectEvents[_0x5795('0x3')](_0x5a6664+':'+_0x599365['id'],_0x599365);SquareProjectEvents[_0x5795('0x3')](_0x5a6664,_0x599365);_0x4495c9(null);};}for(var e in events){if(events[_0x5795('0x4')](e)){var event=events[e];SquareProject[_0x5795('0x5')](e,emitEvent(event));}}module['exports']=SquareProjectEvents;