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 _0xceca=['setMaxListeners','save','update','remove','emit','hasOwnProperty','hook','events','../../mysqldb'];(function(_0xdef895,_0x32bbbe){var _0x2bf2bc=function(_0x16115a){while(--_0x16115a){_0xdef895['push'](_0xdef895['shift']());}};_0x2bf2bc(++_0x32bbbe);}(_0xceca,0xf1));var _0xacec=function(_0x39a12f,_0x1f6cfe){_0x39a12f=_0x39a12f-0x0;var _0x1f8856=_0xceca[_0x39a12f];return _0x1f8856;};'use strict';var EventEmitter=require(_0xacec('0x0'));var SquareProject=require(_0xacec('0x1'))['db']['SquareProject'];var SquareProjectEvents=new EventEmitter();SquareProjectEvents[_0xacec('0x2')](0x0);var events={'afterCreate':_0xacec('0x3'),'afterUpdate':_0xacec('0x4'),'afterDestroy':_0xacec('0x5')};function emitEvent(_0x27549a){return function(_0x344824,_0xcb4853,_0x35b068){SquareProjectEvents[_0xacec('0x6')](_0x27549a+':'+_0x344824['id'],_0x344824);SquareProjectEvents[_0xacec('0x6')](_0x27549a,_0x344824);_0x35b068(null);};}for(var e in events){if(events[_0xacec('0x7')](e)){var event=events[e];SquareProject[_0xacec('0x8')](e,emitEvent(event));}}module['exports']=SquareProjectEvents;